devtools (version 1.10.0)

create: Creates a new package, following all devtools package conventions.

Description

Similar to package.skeleton, except that it only creates the standard devtools directory structures; it doesn't try and create source code and data files by inspecting the global environment.

Usage

create(path, description = getOption("devtools.desc"), check = FALSE,
  rstudio = TRUE)

setup(path = ".", description = getOption("devtools.desc"), check = FALSE, rstudio = TRUE)

Arguments

path
location to create new package. The last component of the path will be used as the package name.
description
list of description values to override default values or add additional values.
check
if TRUE, will automatically run check
rstudio
Create an Rstudio project file? (with use_rstudio)

Details

create requires that the directory doesn't exist yet; it will be created but deleted upon failure. setup assumes an existing directory from which it will infer the package name.

See Also

Text with package.skeleton

Examples

Run this code
# Create a package using all defaults:
path <- file.path(tempdir(), "myDefaultPackage")
create(path)

# Override a description attribute.
path <- file.path(tempdir(), "myCustomPackage")
my_description <- list("Maintainer" =
  "'Yoni Ben-Meshulam' <yoni@opower.com>")
create(path, my_description)

Run the code above in your browser using DataCamp Workspace