Overview
The Standard Project is Framework's default and most versatile project structure. It's designed for data analysis, research, and reporting workflows.
Directory Structure
An example project might look like:
my-project/
βββ functions/ # Custom R functions (auto-loaded)
β βββ helpers.R
βββ inputs/ # Data inputs
β βββ raw/ # Original data (never modify)
β βββ intermediate/ # Cleaned/processed data
β βββ final/ # Analysis-ready datasets
βββ notebooks/ # Analysis notebooks
β βββ 01-exploration.qmd
β βββ 02-modeling.qmd
βββ outputs/
β βββ notebooks/ # Rendered notebooks
βββ scripts/ # Automation scripts
β βββ data-pipeline.R
βββ framework.db # Metadata database
βββ settings.yml # Project configuration
Additional directories are created on first use:
outputs/cache- Cached computationsoutputs/tables- Saved tablesoutputs/figures- Saved figures
Workflow
1. Set Up Environment
Start each session by running scaffold:
library(framework)
scaffold()
This loads:
- Required packages from
settings.yml - Custom functions from
functions/ - Project configuration
2. Create Notebooks
Create analysis notebooks:
make_notebook("exploration")
make_notebook("modeling", subdir = "analysis")
3. Manage Data
Define data in settings.yml:
data:
inputs.raw.sales:
path: inputs/raw/sales_2024.csv
type: csv
Load and process:
sales <- data_read("inputs.raw.sales")
4. Cache Results
Cache expensive computations:
model_results <- cache_remember("sales_model", {
fit_complex_model(sales)
})
Best Practices
Organize Notebooks
Number notebooks to indicate order:
notebooks/
βββ 01-data-import.qmd
βββ 02-cleaning.qmd
βββ 03-exploration.qmd
βββ 04-modeling.qmd
βββ 05-reporting.qmd
Use Subdirectories
For complex projects:
make_notebook("eda", subdir = "exploration")
make_notebook("regression", subdir = "modeling")
Separate Raw from Processed
Never modify raw data:
inputs/
βββ raw/ # NEVER modify
βββ intermediate/ # Cleaned versions
βββ final/ # Ready for analysis