newProject: Create new SpaDES project

newProjectR Documentation

Create new SpaDES project

Description

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

Usage

newProject(name, path, open)

## S4 method for signature 'character,character,logical'
newProject(name, path, open)

## S4 method for signature 'character,character,missing'
newProject(name, path, open)

Arguments

name

project name (name of project directory)

path

path to directory in which to create the project directory

open

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

Value

invoked for side effect of project file creation

Examples

myProjDir <- newProject("myProject", tempdir())

dir.exists(file.path(myProjDir, "cache"))
dir.exists(file.path(myProjDir, "inputs"))
dir.exists(file.path(myProjDir, "modules"))
dir.exists(file.path(myProjDir, "outputs"))
unlink(myProjDir, recursive = TRUE) ## cleanup

SpaDES.core documentation built on Nov. 10, 2023, 5:08 p.m.