rpac_create: Wrapper for passing DESCRIPTION fields and creating a package...

View source: R/rpac_create.R

rpac_createR Documentation

Wrapper for passing DESCRIPTION fields and creating a package directory

Description

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().

Usage

rpac_create(path = NULL, first = NULL, last = NULL, email = NULL,
  role = "c(\"aut\", \"cre\")", lic = "GPL-3", lang = "en-GB",
  rstudio = FALSE, open = FALSE)

Arguments

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

Value

Creates the directory structure in the path provided and adds a GPL3 licence.

Note

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()

Author(s)

Antonio J. Berlanga-Taylor <https://github.com/AntonioJBT/Rpacker>

See Also

create_package

Examples


## Not run: 
rpac_create(path = 'testPackage',
            first = "Super",
            last = "Duper",
            email = "super@duper.com",
            role = 'c("aut", "cre")',
            lang = "en-GB"
            )



## End(Not run)


AntonioJBT/Rpacker documentation built on May 1, 2024, 1:06 a.m.