projr_init creates a standard project structure by making several
directories for raw data, temporary/cache files, final outputs, rendered docs,
and raw (non-rendered) docs. It also can initialise a Git repository (adding
the cache directory to .gitignore and optionally adding & committing all
changes), write a README file with recommended project instructions, and, if
desired, connect the project to GitHub.
Usage
projr_init(
dir_raw_data = "_raw_data",
dir_cache = "_tmp",
dir_docs = "docs",
dir_output = "_output",
dir_reference = "_reference",
init_git = TRUE,
git_add_and_commit_all = TRUE,
init_readme = TRUE,
init_github = TRUE,
github_private = TRUE
)Arguments
- dir_raw_data
Character. Directory for raw data. Defaults to
"_raw_data". Set toNULLto skip creating this directory.- dir_cache
Character. Directory for temporary or cache files. Defaults to
"_tmp". Set toNULLto skip.- dir_docs
Character. Directory for rendered documents. Defaults to
"docs". Set toNULLto skip.- dir_output
Character. Directory for final outputs. Defaults to
"_output". Set toNULLto skip.- dir_reference
Character. Directory for non-rendered docs. Defaults to
"_reference". Set toNULLto skip.- init_git
Logical. If
TRUE(the default), initialises a Git repository in the current project.- git_add_and_commit_all
Logical. If
TRUE(the default), attempts to add and commit all untracked and modified files after Git initialisation.- init_readme
Logical. If
TRUE(the default), creates a README file with recommended project instructions.- init_github
Logical. If
TRUE, connects the project to GitHub viausethis::use_github(). Defaults toTRUE.- github_private
Logical. If
TRUE(the default) and if GitHub is initialised (i.e. wheninit_github = TRUE), the GitHub repository is created as private. A message is issued to remind the user that collaborators must be added manually via GitHub settings.