Analysis pipeline for vegetation community data (trees, shrubs, herbs, regeneration) with environmental correlates.
- R >= 4.3.0
- renv for dependency management
cd 03_analysis
Rscript run_all.ROr using Make:
cd 03_analysis
make all01_data/ # READ-ONLY input data
02_manuscripts/ # Manuscript drafts (not overwritten by pipeline)
03_analysis/ # All generated artifacts
| Script | Description |
|---|---|
| 01_setup.R | Environment setup, package loading, path configuration |
| 02_data_inspect_qc_harmonize.R | Data inspection, QC, harmonization |
| 03_build_matrices.R | Build community matrices |
| 04_nmds_envfit.R | NMDS ordination with environmental fitting |
| 05_permanova_dispersion.R | PERMANOVA and dispersion tests |
| 06_cca_vif_permutation.R | CCA with VIF and permutation tests |
| 07_indicator_species.R | Indicator species analysis |
| 08_diversity_regeneration_metrics.R | Diversity and regeneration metrics |
| 09_ml_regeneration_rf_xgb.R | ML models (Random Forest, XGBoost) |
| 10_publication_figures_and_tables.R | Publication-ready outputs |
03_outputs/: Processed data, tables, figures04_results/: Ordinations, statistical tests, indicator species, ML results06_reports/: HTML and PDF reports
renv.lockcaptures exact package versionssessionInfo.txtrecords R session detailsRUN_METADATA.jsonlogs each pipeline run
The data supporting the findings of this study are available in the Supporting Information (Appendices S1–S10). Processed community matrices, environmental predictors, and statistical outputs are archived in the project repository accompanying this submission. A public repository with a DOI will be provided upon manuscript acceptance to ensure reproducibility and transparency: https://github.com/wangdiues/Vegetation_Ecology