Generate new project directories using cabinet templates.
new_cabinet_proj(
cabinet,
project_name,
r_project = TRUE,
open = TRUE,
renv = TRUE,
git = TRUE,
git_root = NULL,
git_ignore = NULL
)
The name of the cabinet template. Available cabinets can
be found using get_cabinets()
.
The name of the project to store in the cabinet, a character string. Can be a file path pointing to a directory within the specified cabinet.
Logical, should an Rproject be created. Default is TRUE if working in RStudio (only works in RStudio).
Logical, if creating an Rproject, should that project be opened once created. Default is TRUE if working in RStudio (only works in RStudio).
Logical, should a renv
project be initiated.
If TRUE
, renv
project infrastructure will be created using
scaffold
.
Logical, should a git repository be initiated.
A path relative to the project to initiate the git repository. Default is NULL and the repository is initiated at the root of the project.
Character vector of files and directories to add to .gitignore file.
Creates a new directory at the path specified in the
cabinet template. If r_project = TRUE
, a .Rproj file
will also be created using the project name. If open is set
to TRUE, the new R project will opened in a new R session.