The goal of ourproj is to provide a data science project template that combines workflowr or quarto with targets. Analyses are organised in research website, which can be viewed locally and also easily deployed to either GitHub Pages or GitLab Pages.
Installation
You can install the development version of ourproj from GitHub with:
# install.packages("devtools")
devtools::install_github("rmgpanw/ourproj")
Quick start
- Create a new project either from the RStudio new project wizard or from the R console with
ourproj::ourproj_start()
. - Install required R packages with
renv::init()
. - Run targets pipeline with
targets::tar_make()
. This will generate a workflowr research website in either thedocs
orpublic
directory (for GitHub and GitLab Pages respectively), which may be viewed locally by double clicking onindex.html
in your file browser.
library(ourproj)
# create a new project
ourproj_start(directory = "~/NEW_PROJECT_DIR",
project_title = "My project",
git_username = "My git username",
github_gitlab = "github",
template = "workflowr_targets")
# use renv to install required R packages
renv::init()
# run targets pipeline
targets::tar_make()
- Add your own workflowr rmarkdown analyses in the
analysis
folder (a template is provided, available from the RStudio new rmarkdown wizard). These will be automatically tracked by the targets pipeline. - Re-run your analysis pipeline with
targets::tar_make()
.