Initialize a project with subdirectories cache/, modules/, inputs/, outputs/, and setPaths accordingly. If invoked from Rstudio, will also create a new Rstudio project file.

newProject(
  name,
  path = ".",
  type = "basic",
  open = interactive(),
  modules = NULL,
  ...
)

Arguments

name

project name (name of project directory)

path

path to directory in which to create the project directory

type

character string giving the project type. Possible values include: "basic" (default), and "advanced".

open

Logical. Should the new project file be opened after creation? Default TRUE in an interactive session.

modules

A character vector of modules to download and put into the project (see SpaDES.install::getModule for how to specify)

...

Additional arguments. Currently only the following are implemented:

overwrite

If modules are specified, should a new module be downloaded even if it already exists, i.e., overwrite (and destroy) the existing one. Default is FALSE

pkgPath

Path to project's package directory. Defaults to <projectName>_packages in the project's parent directory.

Details

This extends the basic SpaDES project template provided by SpaDES.core.

Examples

if (FALSE) {
## use basic project template
myProjDir <- newProject("myProject", tempdir())

## use advanced project setup
myAdvProjDir <- newProject("myAdvProject", tempdir(), type = "advanced")
}