Set up a project and run your first build:
library(projr)
# Initialise with sensible defaults
projr_init()
# Run a dev build to test
projr_build_dev()projr_init() creates project directories, a
_projr.yml config file,
.gitignore/.Rbuildignore entries, and a
DESCRIPTION file.
For an interactive walkthrough, use projr_init_prompt().
For a full setup including Git, GitHub, and renv, use
projr_init_all().
Use projr_build_dev() while iterating. Dev builds:
_tmp/projr/v<version>/)_output untouchedUse production builds when you are ready to release a new version:
# Patch bump (0.1.0 -> 0.1.1)
projr_build()
projr_build_patch() # equivalent
# Minor bump (0.1.0 -> 0.2.0)
projr_build_minor()
# Major bump (0.1.0 -> 1.0.0)
projr_build_major()Production builds clear and populate _output, bump the
version, record a manifest of inputs and outputs, archive to configured
destinations (GitHub Releases, OSF, or local), and commit/push to Git if
configured.
Add a destination so production builds automatically archive outputs:
Clone and restore raw data on a new machine:
This clones the repo, restores raw data from configured archives, and sets up the project structure.
To update content from archives in an existing project:
| Label | Path | Purpose |
|---|---|---|
raw-data |
_raw_data |
Source data |
cache |
_tmp |
Temporary files and dev build outputs |
output |
_output |
Final outputs (figures, tables) |
docs |
docs |
Rendered documents (HTML, PDF) |
Access directories programmatically:
Each build records file hashes in manifest.csv, linking
outputs to exact input versions. Query it with:
All settings live in _projr.yml. Inspect and validate
with:
Configure Git behaviour: