create_hot_project: Start a new H.O.T. project

Description Usage Arguments Examples

View source: R/create_hot_project.R

Description

Creates a directory with the essential files for a new project. The function can be used on existing project directories as well. This is a thin wrapper for starter::create_project() that sets the default template to template = hotfun::project_template

Usage

1
2
3
4
5
6
create_hot_project(
  path,
  path_data = NULL,
  template = hotfun::project_template,
  ...
)

Arguments

path

A path. If it exists, it is used. If it does not exist, it is created.

path_data

A path. The directory where the secure data exist. Default is NULL. When supplied, a symbolic link to data folder will be created.

template

Specifies template for starter::create_project(template=). Default is hotfun::project_template

...

Arguments passed on to starter::create_project

git

Logical indicating whether to create Git repository. Default is TRUE When NA, user will be prompted whether to initialise Git repo.

renv

Logical indicating whether to add renv to a project. Default is TRUE. When NA user is asked interactively for preference.

symlink

Logical indicating whether to place a symbolic link to the location in path_data=. Default is to place the symbolic link if the project is a git repository.

overwrite

Logical indicating whether to overwrite existing files if they exist. Options are TRUE, FALSE, and NA (aka ask interactively). Default is NA

open

Logical indicating whether to open new project in fresh RStudio session

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: \donttest{
# specifying project folder location (folder does not yet exist)
project_path <- fs::path(tempdir(), "My Project Folder")

# creating folder where secure data would be stored (typically will be a network drive)
secure_data_path <- fs::path(tempdir(), "secure_data")
dir.create(secure_data_path)

# creating new project folder
create_hot_project(project_path, path_data = secure_data_path)
}
## End(Not run)

ddsjoberg/hotfun documentation built on Dec. 12, 2021, 3:41 a.m.