create_proj: Create opinionated package structure using 'drake' and 'renv'

Description Usage Arguments Details Value Author(s) Examples

View source: R/create_proj.R

Description

Create an opinionated package structure using 'drake' and 'renv'

Usage

1
create_proj(repo_name, path = ".")

Arguments

repo_name

Name of the repository in github. For example "cimentadaj/fragile_families".

path

the path where the repository will be saved locally

Details

Clones 'repo_name' from your Github account and saves it in the 'path' specified in the argument. Once cloned, the function creates files 'R/plan.R', 'R/functions.R', 'R/plan.R' and '_drake.R' as per the 'drake' project structure. It adds a few files to ignore in .gitignore, creates and 'Rmd' for the README and adds a template of code for '_drake.R' and 'R/plan.R'.

Finally, it ends by installing 'renv' for package dependency, installs 'drake' automatically and restarts the session in the project directory to being working.

Value

invisible TRUE

Author(s)

Jorge

Examples

1
2
3
4
## Not run: 
create_proj("cimentadaj/fragile_families", ".")

## End(Not run)

cimentadaj/cimentadaj documentation built on Dec. 1, 2019, 5:22 p.m.