rpac_create | R Documentation |
rpac_create() is a wrapper on usethis::create_package(). Passes field arguments for DESCRIPTION and creates the directory skeleton for an R package. Also creates a GPL3 licence, if you prefer other options run usethis::use_*_license().
rpac_create(path = NULL, first = NULL, last = NULL, email = NULL,
role = "c(\"aut\", \"cre\")", lic = "GPL-3", lang = "en-GB",
rstudio = FALSE, open = FALSE)
path |
path as string, field for DESCRIPTION |
first |
First author name, field for DESCRIPTION |
last |
Last author name, field for DESCRIPTION |
email |
Author email for CRAN, field for DESCRIPTION |
role |
, field for DESCRIPTION. Default 'c("aut", "cre")' |
lic |
LICENCE to use. Hardcoded to GPL-3, field for DESCRIPTION only. |
lang |
Field for language, field for DESCRIPTION. Default is "en-GB" |
rstudio |
Creates an RStudio project. Default is FALSE |
open |
Open the project in RStudio on creation. Default is FALSE |
Creates the directory structure in the path provided and adds a GPL3 licence.
path is usually the package name and passed to usethis::create_package. Choose a good name! See e.g. <package naming>. Note that R package names have certain conventions (.e.g it won't accept dashes or underscores) but the vignette creation function included here (from the usethis package) won't take '.'.
For authorship see for example: https://journal.r-project.org/archive/2012-1/RJournal_2012-1_Hornik~et~al.pdf This function will generally create the following files and folders in the specified path: .Rbuildignore # not if rstudio = FALSE .Rproj.user # not if rstudio = FALSE .gitignore # empty DESCRIPTION NAMESPACE R # empty pkg_name.Rproj # not if rstudio = FALSE man # this directory gets created with devtools::document()
Antonio J. Berlanga-Taylor <https://github.com/AntonioJBT/Rpacker>
create_package
## Not run:
rpac_create(path = 'testPackage',
first = "Super",
last = "Duper",
email = "super@duper.com",
role = 'c("aut", "cre")',
lang = "en-GB"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.