Learn R Programming

SpaDES.core (version 2.0.5)

newProject: 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 character,character,logical newProject(name, path, open)

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

Value

invoked for side effect of project file creation

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

Run this code
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

Run the code above in your browser using DataLab