Easily Create Templated R(Studio) Projects


templatr provides an easy way to convert a YAML file with file/directory specifications to an R(Studio) project.

Installation

You can install and load the development version of templatr from GitHub as follows:

# Install the development version from GitHub
if (!require("remotes")) install.packages("remotes")
remotes::install_github("jdtrat/templatr")

# Load package
library(templatr)

Getting Started

Create a new project with a user-specified template that follows the following form:

cat(readLines(template_demo_project()), sep = "\n")
#> project:
#>   name: templatr-demo
#>   structure:
#>     - README.md
#>     - R:
#>       - 01_import_data.R
#>       - 02_clean_data.R
#>     - data:
#>       - sample.csv
#>     - stan-files:
#>     - reports:
#>   git-ignore:
#>     - "data"
#>     - "R/01_import_data.R"

templatr::new_project(path = "path/templatr-demo", template = template_demo_project())

Further Reading

More coming soon! Under active development.

Feedback

If you want to see a feature, or report a bug, please file an issue or open a pull-request! As this package is just getting off the ground, we welcome all feedback and contributions. See our contribution guidelines for more details on getting involved!

Code of Conduct

Please note that the templatr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.