new_cabinet_proj {cabinets}R Documentation

Create a new project using a cabinet template

Description

Generate new project directories using cabinet templates.

Usage

new_cabinet_proj(
  cabinet,
  project_name,
  r_project = TRUE,
  open = TRUE,
  renv = TRUE,
  git = TRUE,
  git_root = NULL,
  git_ignore = NULL
)

Arguments

cabinet

The name of the cabinet template. Available cabinets can be found using get_cabinets().

project_name

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.

r_project

Logical, should an Rproject be created. Default is TRUE if working in RStudio (only works in RStudio).

open

Logical, if creating an Rproject, should that project be opened once created. Default is TRUE if working in RStudio (only works in RStudio).

renv

Logical, should a renv project be initiated. If TRUE, renv project infrastructure will be created using scaffold.

git

Logical, should a git repository be initiated.

git_root

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.

git_ignore

Character vector of files and directories to add to .gitignore file.

Value

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.

See Also

create_cabinet


[Package cabinets version 0.6.0 Index]