###################################
# Alessandra Valcarcel
# May 13, 2020
# Code to create imco package from start
###################################
############################
# Alessandra Valcarcel
# February 13, 2020
# Code to make an example package
############################
###################################################################
# Create the package using `usethis::create_package`
###################################################################
usethis::create_package(path ='/Users/alval/Box/rpackages/imco')
###################################################################
# Initialize with GitHub
###################################################################
usethis::use_git()
###################################################################
# Set up package on GitHub
###################################################################
# 1. Go to your GitHub and + new repository
# 2. Name your repository the same thing as your R package
# 3. Do not initialize a Readme.md
# 4. Set up a git remote from your local repository to GitHub. From the terminal
# in the package working directory:
# cd /Users/alval/Box/rpackages/imco
# git remote add origin git@github.com:avalcarcel9/imco.git
# 5. Push your changes
# git push -u origin master
# Your package repository is now on GitHub
###################################################################
# Description
###################################################################
usethis::use_description()
# *Note
# If you create a lot of packages, consider storing personalized defaults as a
# named list in an option named "usethis.description". Here's an example of code
# to include in .Rprofile:
# Run
# usethis::edit_r_profile()
# Then edit, add, save, and restart R
# options( usethis.description = list( `Authors@R` = 'person("Jane", "Doe",
# email = "jane@example.com", role = c("aut", "cre"), comment = c(ORCID =
# "YOUR-ORCID-ID"))', License = "MIT + file LICENSE", Language = "es" ) )
###################################################################
# Add README (.md and .Rmd)
###################################################################
# .md
usethis::use_readme_md()
# .Rmd
usethis::use_readme_rmd()
###################################################################
# Add a vignette
###################################################################
usethis::use_vignette("imco", "imco Tutorial")
###################################################################
# Add continuous integration
###################################################################
# Appveyor
usethis::use_appveyor()
# Travis
usethis::use_travis()
# Coverage
usethis::use_coverage("coveralls")
###################################################################
# Add pkgdown site
###################################################################
# Get started with usethis:
# Run once to configure your package to use pkgdown
usethis::use_pkgdown()
# Use pkgdown to update your website:
# Run to build the website
pkgdown::build_site()
# TODO
## Add R functions
## Add dependencies
# usethis::use_package()
## Add data
# usethis::use_data_raw()
# usethis::use_data()
## Add tests
# usethis::use_testthat()
# usethis::use_test()
## Re-compile pkgdown
# Run to build the website after every important change to update pkdown.
# Need to change yml to group functions appropriately
# pkgdown::build_site()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.