Initialize a project with subdirectories cache/, modules/, inputs/, outputs/, and setPaths accordingly.

newProject(name, path, open)

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

# S4 method for 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.

Examples

myProjDir <- newProject("myProject", tempdir())
#> Setting: #> options( #> reproducible.cachePath = '/tmp/RtmpsU1PUh/myProject/cache' #> spades.inputPath = '/tmp/RtmpsU1PUh/myProject/inputs' #> spades.outputPath = '/tmp/RtmpsU1PUh/myProject/outputs' #> spades.modulePath = '/tmp/RtmpsU1PUh/myProject/modules' #> )
#> Paths set to: #> options( #> rasterTmpDir = '/tmp/RtmpsU1PUh/raster' #> reproducible.cachePath = '/tmp/RtmpsU1PUh/myProject/cache' #> spades.inputPath = '/tmp/RtmpsU1PUh/myProject/inputs' #> spades.outputPath = '/tmp/RtmpsU1PUh/myProject/outputs' #> spades.modulePath = '/tmp/RtmpsU1PUh/myProject/modules' #> )
dir.exists(file.path(myProjDir, "cache"))
#> [1] TRUE
dir.exists(file.path(myProjDir, "inputs"))
#> [1] TRUE
dir.exists(file.path(myProjDir, "modules"))
#> [1] TRUE
dir.exists(file.path(myProjDir, "outputs"))
#> [1] TRUE
unlink(myProjDir, recursive = TRUE) ## cleanup