This
README.mdis generated fromREADME.qmd.
Please editREADME.qmdand re-render instead of editing this file directly.
This repository contains analysis code and reproducibility materials for the LeafContourEFD manuscript. The software itself is available at: leaf-contour-efd
Follow these steps to confirm the environment and run a first example notebook.
-
Get the data (see (data?) section below).
-
Set
PROJECT_DATA_DIRin.Renviron(project root):
.Renviron
PROJECT_DATA_DIR=/path/to/your/data
- Restore the R package environment:
renv::restore()- Execute analysis notebooks in
notebooks/. (.qmdfiles; Quarto is required)
To reproduce the analysis, you need:
If you install renv, you can install
the required R packages by executing renv::restore() (see below). All
analysis code is written in R version 4.3.1 (R 2026).
- Air: R code formatter.
- Positron: IDE used for all analyses in this project, but not required to run the code.
In this repository, I use renv to manage R package dependencies. Please execute command below after installing renv.
# install.packages("renv") # if not installed
renv::restore()Raw data are available on Dryad (DOI: in preparation).
Tracked-vs-external data policy is documented in data/README.md.
This project may require setting a local data directory via environment
variable. Create a .Renviron file in the project root and add:
.Renviron
PROJECT_DATA_DIR=/path/to/your/data
For example:
- macOS: /Users/yourname/Dropbox/project_data
- Windows: C:/Users/yourname/Dropbox/project_data
Generated artifacts should be written to deterministic, repository-relative paths:
outputs/figures/: rendered figures/images (e.g., SVGs from notebooks)outputs/tables/: derived tabular outputsoutputs/cache/: temporary caches/intermediate artifacts
Notebooks in notebooks/ follow these conventions and avoid
user-specific absolute output paths.
| Path | Purpose |
|---|---|
notebooks/ |
Quarto notebooks used for analysis, figures, and report outputs. |
scripts/ or R/ |
Reusable R scripts/functions shared across notebooks and workflows. |
renv/ |
Project-local R environment metadata and lockfile support. |
PROJECT_DATA_DIR location |
External data directory expected by analysis code (set via .Renviron). |
-
PROJECT_DATA_DIRis not set or points to the wrong location
Symptoms: file-not-found errors when running notebooks or scripts.
Fix: confirm.Renvironexists in project root and contains the correct absolute path. -
renv::restore()fails
Symptoms: package installation errors, version conflicts, or missing system libraries.
Fix: update R to a compatible version (4.3.1+ recommended), then retryrenv::restore()and install missing system dependencies if prompted. -
Quarto is missing or not on PATH
Symptoms:quarto: command not foundor render failures.
Fix: install Quarto from https://quarto.org/ and verify withquarto --version.
This README.md is generated from README.qmd using
Quarto by using the command:
quarto render README.qmdChatGPT was used to improve the documentation and code. Codex was used to refactor the code in this repository. GitHub Copilot was used for coding assistance.
R: A Language and Environment for Statistical Computing. 2026. Vienna, Austria. https://www.R-project.org/.