Creates a package template in a new folder. Use this function when you want to start a new package. Please DO READ vignette("getting_started") before running this function.

create_package(package, path = ".", title, description, maintainer, language)

Arguments

package

Name of the new package.

path

Where to create the package directory.

title

A single sentence with the title of the package.

description

A single paragraph describing the package.

maintainer

The output of utils::person() or orcid2person(). If you use utils::person(), then you must provide given, family, role, email and comment with valid ORCID. When missing, the functions looks for usethis.description in the options. See usethis::use_description() for more information.

language

Language of the package package in ISO 639-3 format.

Details

What you get with a checklist setup:

  • minimal folder structure and files required for an R package using INBO guidelines with GPL-3 license.

  • an RStudio project file

  • a local git repository

  • an initial NEWS.md file

  • a template for an README.Rmd

  • set-up for automated checks and releases of the package using GitHub Actions.

  • a code of conduct and contributing guidelines.

  • the set-up for a pkgdown website using the INBO corporate identity.

See also

Examples

# maintainer in `utils::person()` format
maintainer <- person(
  given = "Thierry",
  family = "Onkelinx",
  role = c("aut", "cre"),
  email = "thierry.onkelinx@inbo.be",
  comment = c(ORCID = "0000-0001-8804-4216")
)
# maintainer with `orcid2person()`
if (FALSE) {
maintainer <- orcid2person("0000-0001-8804-4216")
}

# creating the package
path <- tempfile()
dir.create(path)
create_package(
  path = path, package = "packagename", title = "package title",
  description = "A short description.", maintainer = maintainer,
  language = "eng"
)
#> No `checklist.yml` found. Assuming this is a package.
#> See `?write_checklist` to generate a `checklist.yml`.
#> package created at `/tmp/Rtmp2W6Pqa/file1310741d0258/packagename`