make_project: create a project

Description Usage Arguments Details Value Examples

Description

Creates a new project and sets up all of the relevant directories and their initial contents.

Usage

1
2
3
4
5
6
7
make_project(
  project,
  path = getwd(),
  folders = c("figures", "documentation", "data", "reports", "R"),
  readme = "README.md",
  git = FALSE
)

Arguments

project

A character string containing the name for this new project.

path

An optional character string containing the path for this new project. By default, the path is set to the current directory.

folders

An optional character vector containing the names of the subdirectories. By default, the project will contain only five subdirectories with default names.

readme

An optional character string containing the name of the readme file. By default, the name of the readme file will be "README.md".

git

An optional boolean value indicating whether the project files should be committed to Github (TRUE) or not (FALSE). Default is FALSE.

Details

This function creates a new project and sets up all of the relevant directories and their initial contents. If the path of the project is not specified, the path will be set to the current directory. The default behavior is to add 5 essential subdirectories, but it is also possible to specify or add your own subdirectories. make_project also creates a readme file called "README.md" by default. You can specify the name of the readme file. The project files will be commited to Github if git = TRUE, however, the default is FALSE.

Value

No value is returned (this function is called for its side effects.)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
make_project("newproject")

# provide a custom path for the project.
make_project("newproject", path = "path/to/new-project")

# automatically commit the new project files to Github

make_project("secondproject", git = TRUE)

## End(Not run)

malneyadi4/dsproject documentation built on Jan. 1, 2021, 8:30 a.m.