DOI: 10.6084/m9.figshare.30581402
title: Sustained climate change drives rapid evolutionary reduction of phenotypic plasticity

description: This repository contains the raw data, metadata, and R code to reproduce all analyses and figures for our manuscript. We ran a five-year resurrection experiment across a strong precipitation (aridity) gradient to test predictions about contemporary evolution in trait means and phenotypic plasticity under ongoing drought. We quantified morphological and physiological traits under moist vs drought, computed RDPI as an index of plasticity, and analysed multivariate structure (PERMANOVA/PCoA), univariate mixed models, and fitness proxies (flower number under drought).Contents<code>data/Taraxacum_assimilation_data.csv</code> — Raw trait observations across treatments and years (LA, LFW, Amax, gs/gmax, WUEi, Biomass; plus Population, Latitude, Year, Fam).<code>data/Flowers_drought_only.csv</code> — Flower counts under drought by population, year, and family.<code>metadata/variable_dictionary.csv</code> — Column definitions, units, and notes.<code>R/00_main.R</code> — Driver script: installs dependencies, sets directories, and orchestrates the full workflow.<code>R/01_multivariate_traits.R</code> — PERMANOVA / ordination of scaled traits.<code>R/02_univariate_traits.R</code> — GLMM/GLM per trait (<code>lme4</code>, Type-III tests).<code>R/03_compute_RDPI.R</code> — RDPI computation/checks from raw trait matrices.<code>R/04_RDPI_trait_GLMs.R</code> — GLMs of RDPI per trait: <code>RDPI ~ Year * Latitude</code> (Type-III, LR).<code>R/05_overall_RDPI_analysis.R</code> — Overall/composite RDPI analyses (GLM, emmeans, CLD letters, figures).<code>R/06_RDPI_vs_flowers.R</code> — Links overall plasticity (RDPI) to fitness (flowers under drought) with mixed models and per-year slopes.<code>R/07_figures.R</code> — Publication figures (e.g., Fig. 2 PCoA with trajectories; exports to <code>output/figures/</code>).<code>output/tables/</code> — Model tables, ANOVAs, emmeans, slopes, etc.<code>output/figures/</code> — Final figure files (JPEG/PNG/PDF).<code>output/outdata/PI_all_traits.csv</code> — Derived per-individual RDPI by trait and year (≈ 15,000 rows; 2,500 per trait).<code>session_info/</code> — R session information saved by <code>00_main.R</code>.<code>README.md</code> — Quick start and run order.How to reproduceOpen <code>R/00_main.R</code> and run it. This will:Install/load required packages (including <code>devtools</code>) and set project paths.Read the raw CSVs in <code>data/</code>.Source scripts <code>01</code>–<code>07</code> in order and write outputs to <code>output/</code>.Figures and tables are written to <code>output/figures/</code> and <code>output/tables/</code>. Derived datasets (e.g., <code>PI_all_traits.csv</code>) are written to <code>output/outdata/</code>.Note on packages: RDPI is computed with the Plasticity package. If needed, install once via:<br><code>install.packages("devtools")</code><br><code>devtools::install_github("ameztegui/Plasticity", upgrade = "never", dependencies = TRUE)</code>Re-useAll data and code are organised for transparent re-use and auditing. See <code>metadata/variable_dictionary.csv</code> for column-level details and units. Please cite the manuscript and this archive if you use these materials.