##########################################################################
##########################################################################
##########################################################################
Data and code to accompany:
"Are genetic variation and demographic performance linked?"
Lauren N. Carley*, William F. Morris, Roberta Walsh, Donna Riebe, and Tom Mitchelle-Olds
*contact: lauren.n.carley@gmail.com
##########################################################################
##########################################################################
##########################################################################
STRUCTURE OF THIS ARCHIVE:
Details on the purpose of each file in these folders, and their sub-
directories, is provided below, following the general outline:
fecunda_archive_R1/
README_R1.txt
1-data/
2-cleanup/
3-modelsel/
4-ipm/
4a-mean_matrix/
4b-parallel_simulations/
4c-post_processing/
5-final/
##########################################################################
##########################################################################
##########################################################################
fecunda_archive_R1/
This directory contains all of the other subdirectories, which take you
through data processing, modeling and simulations, and analysis step by step.
It also contains four files:
##########################################################################
README_R1.txt
You are currently reading this text file. It explains all of the other
files associated with this archive. How meta.
##########################################################################
Song-MitchellOlds-2007-popgen.csv
This data file (.csv format, sep=",") contains population genetic parameters
for each of the 5 focal populations in this study, extracted from Table 3
of Song & Mitchell-Olds 2007, Molecular Ecology (doi: 10.1111/j.1365-294X.2007.03500.x).
Columns are as follows:
Pop ID: population identifier (CG=Charley's Gulch; DC=Dewey Cemetery;
JC=Jerry Creek; LG=Lime Gulch; VP=Vipond Park)
P: percent polymorphic loci
na: observed allele number
ne: effective allele number
Ho: observed heterozygosity
Hs: gene diversity
Rs: allelic richness
Fis: inbreeding coefficient
##########################################################################
fecunda-quadrats.csv
This file contains the data collected during the September 2019 re-census
of the 5 focal populations.
Columns are as follows:
Date: date of re-census
Site: population ID
Transect: transect name, nested within site
Quadrat: quadrat number, nested within transect
Total_plants: living B. fecunda individuals counted in that quadrat.
These values was used to estimate contemporary population density.
Repro_plants: living B. fecunda individuals counted in that quadrat that
showed evidence of having reproduced that year. (The census took place
at the end of the growing season, so most fruits were not intact;
this was inferred from the presence of fruits or any fruit remains at
the top of bolting stalks)
##########################################################################
fecunda-coordinates.csv
This file contains the location information for each population when re-
censused in 2019, as well as summary statistics from the previous file. In addition,
location data are included for other known populations of this species, outside
of the five focal populations, as reported in prior literature. Location data on
these populations was used to create Figure 1B.
Columns are as follows:
Site: site name
ID: population ID
Focal_demog: determines whether each population was included in the long-term
demographic censuses (Y=yes; N=no)
Genetic_group: Denotes each population's genetic group as determined in Song &
Mitchell-Olds 2007 (Molecular Ecology), if included in that study
Date: date visited for re-census in 2019
Transect: transect name of the first transect walked in 2019, which
was recorded by taking GPS coordinates at the start and end of the
transect
Start_lat: the latitude, in decimal degrees, of the starting point
in the transect
Start_lon: the longitude, in decimal degrees, of the starting point
in the transect
End_lat: the latitude, in decimal degrees, of the ending point in
the transect
End_lon: the longitude, in decimal degrees, of the ending point in the
transect
Total_plants: the total number of B. fecunda individuals counted in
all quadrats at that site in 2019
Density_per_m2: the density of B. fecunda plants per square meter
observed in 2019 (calculated by dividing Total_plants by 40, which
is the number of square meters searched at each site)
Num_repro: the total number of reproductive B. fecunda individuals
counted in all quadrats at that site in 2019
Prop_repro: the proportion of counted B. fecunda individuals that
appeared to have reproduced in 2019
Notes: field notes about the study sites upon re-visiting in 2019
*Original_Lat: latitude, in decimal degrees, of the location of the
permanent transects in the 1990s
*Original_Lon: longitude, in decimal degrees, of the location of the
permanent transects in the 1990s
Note: The two columns that begin with an asterisk (*) mark the location of
the 1990s permanent transects as recalled by the authors.
These values differ slightly from the coordinates reported for the same
sites in Song & Mitchell-Olds 2007.
Discrepancies between previous and current GPS-determined locations are to
be expected due to the U.S. government's "Selective Availability" program
that ran through the 1990s.
##########################################################################
##########################################################################
##########################################################################
fecunda_archive/1-data/
This folder contains the data from B. fecunda demographic censuses conducted
in the field from 1990-1997, and code to merge and process these files.
##########################################################################
Raw data files
There is one file (.csv format, sep=",") per population. The population
ID (matching Table 1) is the first two letters of each file name.
In each data file, rows represent individual plants, and columns represent
observations in each census year. In other words, there is one column for
survival in 1990, and another column for survival in 1991, etc.
Columns are as follows:
RecNum: a record number for each plant
Pop.ID: the 2-letter population ID (matching Table 1)
Pop: a number identifying the population (redundant with Pop.ID)
Tran: transect number within the population
Quad: quadrat number within the transect, within the population
Y: location coordinate 1 within the quadrat
X: location coordinate 2 within the quadrat
Concat_location: a concatenated variable combining Tran, Quad, Y and
X into one string
Ros_x_: the number of rosettes in year _x_
RosDi_x_: rosette diameter, in mm, in year _x_
RosHt_x_: rosette height, in mm, in year _x_
Inf_x_: number of inflorescences in year _x_
InfHt_x_: inflorescence height, in mm, in year _x_
Frt_x_: number of fruits produced in year _x_
Bolt_x_ or BO_x_: was an individual a bolter (i.e., reproduced without
a basal rosette) in year _x_?
DUM_x_: dummy variable; disregard
Notes_x_: field notes in year _x_
Alive_x_: was the individual alive in year _x_?
New_x_: was the individual a new recruit in year _x_? (i.e., not
previously observed)
*Rein_x_: was the individual a "reincarnate" in year _x_ (i.e., appeared
to come back to life after being previously censused as dead)
Chew_x_: was the individual chewed in year _x_?
Damage_x_: was the individual damaged in year _x_?
Repro_x_: did the individual reproduce in year _x_?
DidBolt_x_: did the individual make an inflorescence in year _x_?
*LifeRepro: did the individual ever reproduce during the census period?
*DOB: what year did the individual enter the study?
*DOD: what was the last year this individual was censused alive?
*AAD: how many years was the individual censused alive?
*TotFit: total fitness
*WrongSp: wrong species?
*BadDate: unknown
*Founder: unknown
*Trouble: unknown
*Match: unknown
*Imputed: unknown
Note that all columns marked with a leading asterisk (*) are presumably
derived variables calculated prior to this study. We believe they were
only calculated using the subset of data spanning 1990-1995. They are
included for historical purposes, but were not used in this paper. All
derived variables used in analyses here were calculated in R using the
scripts archived here.
##########################################################################
fecunda_merge_archive.Rmd
This is an R Markdown code file that streamlines and merges the above
5 data files into one file for all 5 populations.
All this code does is select out the same subset of relevant columns
from each individual data file, arrange them in the same order, and
then bind them together row-wise. It also renames some of the columns
for consistency across years.
It writes out the file "allpops-raw.csv" into the fecunda_archive/2-cleanup/
subdirectory, where it is input for additional code to clean up and
process the data.
##########################################################################
##########################################################################
##########################################################################
fecunda_archive/2-cleanup/
This subdirectory contains one data file containing the merged field data
(1990-1997, all 5 populations) and one code file to perform data processing
and cleanup before use in demographic analyses.
##########################################################################
allpops-raw.csv
This data file (.csv format, sep=",") is written out by the code merging
the 5 raw data files in the previous folder (fecunda_archive/1-data).
Column names are generally as reported above for the 5 raw data files,
except columns containing unknown data and/or derived data calculated
from old subsets of the full census period have been discarded.
##########################################################################
fecunda_cleanup_archive.Rmd
This is an R Markdown file containing code to clean up the merged
dataset and compute some derived variables for downstream analyses.
Specifically, dummy values (-999999) are replaced with NAs, and NAs
in survival columns are converted to 0s.
"Reincarnates" were inferred from the sequence of survival values from
1990-1997 (described in the Methods).
The code writes out two files -- cleaned demographic data in wide
(one row per plant, columns are years) and long (one row per plant-year)
formats -- into the fecunda_archive/3-modelsel. subdirectory.
##########################################################################
##########################################################################
##########################################################################
fecunda_archive/3-modelsel/
This subdirectory contains two data files containing cleaned demographic
data, and one code file to fit vital rate regressions from them, and then
perform model selection.
##########################################################################
allpops-long-cleaned.csv
This data file (.csv format, sep=",") is written out by the code doing
data cleanup in the previous folder (fecunda_archive/2-cleanup/).
In this file, the data are in "long" format, i.e. each row is a plant-year.
For example, the survival record of an individual across all years is
stored in a single column, with a separate column indicating the year
in which survival was recorded.
Column names are as described in previous demography files.
##########################################################################
allpops-wide-cleaned.csv
This data file (.csv format, sep=",") is written out by the code doing
data cleanup in the previous folder (fecunda_archive/2-cleanup/).
In this file, the data are in "wide" format, i.e. each row is a plant.
For example, the survival record of an individual in 1990 will be found
in one column, and the survival record of the same individual in 1991
will be found in a separate column.
In general, column names are as described above for the raw input data.
##########################################################################
fecunda_vrr_modelsel_archive.Rmd
This is an R Markdown file containing code fit vital rate regressions
(VRRs) for use in demographic modeling.
First, "aboveground dormancy" and "bolters" (details in Methods and
Appendix 1) are inferred as derived variables from the raw data.
Then, VRRs are fit for each population. They are state-specific when
appropriate (Supplementary Figs. 1, 2, 5; Supplementary Table 1; Appendix 1).
Most VRRs utilize continuous size (here, rosette diameter) as a predictor
of discrete (e.g. states, survival, reproduction) and continuous (e.g.
growth, number of fruits) life history transitions.
The general approach (details in Methods and Appendix 1) was to fit a
maximal model including fixed effects of size and size^2 and random
effects of census year and quadrat (nested within transect) on each transition.
The code then performs model selection and generates tables comparing AICc
values of the maximal model compared to nested reduced models (e.g., retaining
a linear but not squared effect of size).
The best-fit model for each VRR of each population, along with its
coefficient estimates, variance-covariance matrices, and other model
output are saved for use in subsequent demographic modeling.
The code writes out 6 output files, each of which is saved to the
fecunda_archive/4-ipm subdirectory. (They are described below.)
##########################################################################
##########################################################################
##########################################################################
fecunda_archive/4-ipm/
This subdirectory contains 11 data files, one code file, and 3 subdirectories
containing additional code files used in building the integral projection
models (IPMs) and performing associated demographic simulations.
##########################################################################
allpops_long_cleaned_dormancy.csv
This data file (.csv format, sep=",") contains the output of the code
fecunda_vrr_modelsel_archive.Rmd found in the previous subdirectory
(fecunda_archive/3-ipm/).
The demographic data are in "long" format, i.e., each row is a plant-
year, as described above.
Columns are as follows:
ID: concatenated population ID and RecNum
Pop: population ID
trans: transect (nested within pop)
quad: quadrat (nested within transect)
Year1: census year of year 1 in long format
size0: rosette diameter (mm) in the previous year (Year1-1)
size1: rosette diameter in (mm) the current year (Year1)
size2: rosette diameter (mm) in the next year (Year1+1)
logS0: log(size0)
logS1: log(size1)
logS2: log(size2)
surv1: survival in the current year (Year1)
surv2: survival in the next year (Year1+1)
rein1: "reincarnate" (0/1) in the current year (Year1)
rein2: "reincarnate" (0/1) in the next year (Year1+1)
didfrt1: did produce a fruit (0/1) in the current year (Year1)
didfrt2: did produce a fruit (0/1) in the next year (Year1+1)
numfrt1: number of fruits produced in the current year (Year1)
numfrt2: number of fruits produced in the next year (Year1+1)
dorm1: "dormant" (no aboveground tissue, but alive; 0/1) in the current year (Year1)
dorm2: "dormant" (no aboveground tissue, but alive; 0/1) in the next year (Year1+1)
predorm: rosette diameter (mm) in the last year before becoming "dormant"
postdorm: rosette diameter (mm) upon exiting "dormancy"
bolter1: "bolter" (produced a bolting stalk without a basal rosette; 0/1) in the current year (Year1)
bolter2: "bolter" (produced a bolting stalk without a basal rosette; 0/1) in the next year (Year1+1)
prebolter: rosette diameter (mm) in the year before becoming a "bolter"
These are the finalized demography data used in fitting VRRs.
##########################################################################
vrrs-model-list.csv
This is a table (.csv format, sep=",") written out by the code
fecunda_vrr_modelsel_archive.Rmd.
It records the final VRR formulas for each population, following model
selection.
This was used to make Supplementary Table 1, although formulas provided
here are in the standard notation for a mixed models fit using the 'lme4'
package in R.
Columns are as follows:
vrr: the modeled vital rate regression; bolter=probability of becoming a bolter;
dormB=probability of entering aboveground dormancy for individuals that are
currently bolters; dormNB=probability of entering aboveground dormancy
for individuals that are not currently bolters; exit.dorm=probability of
exiting aboveground dormancy for individuals who are currently aboveground-
dormant; exit.dorm.size=size (rosette diameter) upon exiting dormancy for
individuals who are currently aboveground-dormant; growthB=growth (change
in rosette diameter) for individuals who are currently bolters; growthNB=
growth (change in rosette diameter) for individuals who are currently not
bolters; gr.residNB=size-dependent residual variance in growth for individuals
who are not currently bolters; rebolter=probability of remaining a bolter
for individuals who are currently bolters; didrepNB=probability of reproduction
for individuals who are currently not bolters; frtsNB=number of fruits
produced (conditional on reproduction) for individuals who are not currently
bolters; survB=probability of survival for individuals who are currently
bolters; survNB=probability of survival for individuals who are not
currently bolters; rec.rate=the number of new recruits entering populations
in time t+1; rec.size=the size of new recruits entering populations in time
t+1; didrepB=probability of reproduction for individuals who are currently
bolters; frtsB=the number of fruits produced (conditional on reproduction)
for individuals that are bolters
pop: population ID
best.fit: a text string, bounded by quotation marks, listing the best-fit
vital rate regression retained for each population following model selection
##########################################################################
fecunda-empirical-N-90-97.Rdata
This is a list of dataframes containing the censused population size
for each population from 1990-1997. Each list item is named with the population ID,
and then the population sizes for each pop is given as a named integer (with the
name equal to the census year and the integer equal to the total number of plants
observed in that year).
These values were calculated by summing living individuals in each
population in each year. This is done in lines 3099-3138 of
fecunda_vrr_modelsel_archive.Rmd in the previous subdirectory.
##########################################################################
fecunda-vrr-modelsel-output.Rdata
This is a list containing various outputs of best-fit VRRs following
model selection, to be used in the demographic models and simulations. Across all
data objects, VRR names are defined in the metadata above for "vrrs-model-list.csv"
coefs: this is a list of data frames containing coefficient estimates
for each best-fit VRR for each population
vcmat: this is a list of the variance-covariance matrices for fixed
effects in each best-fit VRR model (extracted in lines 2379-2477
of fecunda_vrr_modelsel_archive.Rmd)
mainfx: this is a list of the mean estimates of main effects
in best-fit VRR models (extracted in lines 2479-2577 of
fecunda_vrr_modelsel_archive.Rmd)
ranfx: this is a list of the random effect estimates for years in best-fit
VRR models (extracted in lines 2579-2677 of fecunda_vrr_modelsel_archive.Rmd)
yr.var: this is a list of the variance of the random effect estimates
for years in best-fit VRR models (extracted in lines 2679-2777 of
fecunda_vrr_modelsel_archive.Rmd)
yr.k: this is the number of years included (as a random effect) in
each best-fit VRR model for each population (extracted in lines 2779-2877
of fecunda_vrr_modelsel_archive.Rmd)
##########################################################################
fecunda-vrr-residual-variances.Rdata
This is a list containing the residual variance in vital rate models
predicting size that is not modeled directly by size in the previous
year (i.e., of new recruits, upon exiting dormancy, and after being a
"bolter").
The residual variances are extracted from VRRs and concatenated into
a list in lines 2879-3000 of fecunda_vrr_modelsel_archive.Rmd.
Across all data objects, VRR names are defined in the metadata above for
"vrrs-model-list.csv"
##########################################################################
fecunda-size-dists-97.Rdata
This is a list containing the Weibull distribution parameters (shape and scale)
describing the distribution of sizes in each population in the final year of the
demographic census (1997).
##########################################################################
fecunda_ipm_source_functions.R
This is a code file containing source functions used in building the IPMs.
It includes the vital rate functions (lines 7-154) and a function to
build the IPM kernel and apply these functions to the appropriate
state-specific sub-matrices (sensu Supplementary Figure 1; lines 156-286).
##########################################################################
fecunda-stable-size-dist-pop_x_.csv
These 5 .csv files contain the stable size distributions for the 5
populations, as computed in fecunda_stable_size_dists.R (see subdirectory
4a below).
In this case, the populations are referred to by their numeric rather
than 2-letter IDs. They are in alphabetical order.
Columns are as follows:
state: "normal" vs. "dormant" vs. "bolter" portions of the vector,
representing three discrete life-history stages of this species.
Each of the 3 sections has nmp rows.
size: the rosette diameter, in mm, associated with each vector element;
i.e. the midpoint of each size bin after discretizing the continuous
range of sizes used to build the IPM
N: the proportion of individuals in the population occupying each size
space at the stable size distribution
##########################################################################
##########################################################################
4a-mean_matrix/
##########################################################################
fecunda_stable_size_dists.R
This is a code file that builds one multi-matrix IPM per population
per year, applying the mean coefficient estimates from best-fit VRRs.
In other words, it does not sample from the distributions of estimated
VRR coefficients, as is done in the bootstraped simulations.
The stable size distribution is calculated as dominant eigenvector
of the mean matrix across all annual kernels populated using the
mean coefficient estimates (line 142).
The proportion of individuals in each discrete state at the stable
distribution is then calculated by summing the probabilities in each
of the three sections of vector (lines 145-153).
Executing this code will write out several files:
One .rda file per population containing a list of the average kernels for
each year (i.e. K90, K91, K92, etc.)
One .csv file per population containing the mean kernel across all years
One .csv file per population containing the stable size distribution
Only the latter set of output files (stable size dists) are used in
downstream analyses, so the other 10 files are not archived here. They can be
recreated if desired by running this code.
##########################################################################
##########################################################################
4b-parallel_simulations/
This subdirectory contains two code files which perform the bootstrapped
simulations (sampling from VRR parameter distributions) of IPM projections
for each of the 5 populations.
Because the multi-matrix model structure (Supplementary Figure 2) is
highly dimensional ((nmp*3)*(nmp*3)), each simulation step is slow. This
code works best run in parallel on a remote cluster server.
In order to run these simulations on a cluster without modifying the
existing code much, you will need to set up the following file structure
on your remote server:
fecunda/ - the main working directory for R code executed in cluster
- push 6 input files (described at the beginning of step 4) to here
parallel_R1/ - cd to this subdirectory to execute parallel batch job
- push 5 results files obtained from step 4a (described above) to here
- push .R and .sh parallel scripts (described below) to here
Rout/ - subdirectory to hold R outputs from each job array item (here, 5,000)
slurmErrors/ - subdirectory to hold slurm errors for each job array item (here, 5,000)
slurmOutputs/ - subdirectory to hold slurm messages for each job array item (here, 5,000)
SCRATCH/ - temporary remote directory with large capacity to store
intermediate files. Since each individual bootstrap run is executed in
parallel, saved files with summary statistics will each just be one row,
and need to be concatenated later. Output files are written into the
following subdirectories:
extinction/ - proportion of lineages ending in extinction during 1,000
22-year projections conducted in each bootstrap run
lamstoc/ - estimated stochastic lambda value over 50,000 projections
projections/ - average predicted N and standard deviation of projected
N in each year between 1997 and 2019, across the 1,000 iterations per bootstrap run
sampled_params/ - the particular VRR coefficients sampled in each bootstrap run
Each of the above subdirectories (extinction, lamstoc, and projections) needs to
have 5 subdirectories within it, one for each population:
pop1/
pop2/
pop3/
pop4/
pop5/
The projections/pop_x_ and sampled_params/pop_x_ subdirectories also each have one further
subdirectory called "raw/" to save a subset of raw replicate projections within each bootstrap run,
instead of just summary statistics across replicate projections within each bootstrap run.
Once you've set up the file structure as above, you can run the simulations using
the files in this archive, each of which is described below:
##########################################################################
fecunda_ipm_full_parallel_R1.R
This R code file performs the demographic simulations in parallel,
sampling from the distribution of parameter values estimated in each
best-fit VRR.
To run, it depends upon the VRR source code (fecunda_ipm_source_functions.R)
and the input data files described at the beginning of step 4.
If you set up the file structure as described above, you should be
able to get this code to run just by changing lines 7 and 10 to reflect
the locations everything is at on your remote server.
##########################################################################
fecunda_ipm_full_parallel.sh
This is a shell script that submits a batch job to SLURM asking it to
run the fecunda_ipm_full_parallel.R code 5,000 times in parallel.
Before you run it, you'll want to change the email address, partition
names, and other settings accordingly based on how your cluster is
set up.
##########################################################################
##########################################################################
4c-post_processing/
This subdirectory contains a text file
'fecunda_concatenate_bootstrap_output.txt'. There are some general instructions
about concatenating the parallel simulation output here.
The code file 'out_concat.sh' is a shell script that submits a batch job to the
cluster asking it to execute the concatenation of the parallel output.
Running this script will take the many thousands of small files saved
in the temporary scratch directory and write out a single .csv file
for each derived metric (extinction risk, stochastic lambda, projected
population size, etc.) for each population.
The concatenated files will be routed to a new subdirectory in the
main remote working directory set up above
(i.e. /fecunda/parallel_R1/out_concat/).
##########################################################################
##########################################################################
##########################################################################
fecunda_archive/5-results/
This subdirectory contains the concatenated output of the demographic
simulations executed in step 4.
It also contains code files to analyze the output data in relation to
population genetic data in Song & Mitchell-Olds 2007, and to make all
of the data figures in this manuscript.
##########################################################################
*.csv
All of the .csv files in this subdirectory are the concatenated
outputs of the demographic simulations executed in step 4. See above
for more details.
bootstrapped_params_pop_x_:
column 1: pop ID
column 2: vital rate regression
column 3: year
column 4: sampled coefficient estimate
extinction_pop_x_: a vector of values (one per bootstrap run) indicating the
proportion of replicate trajectories in that run that ended in extinction, for
each population _x_
lamstoc_pop_x_: a vector of named values (one per bootstrap run) indicating the
stochastic population growth rate computed from replicate projections; the value
is stochastic lambda and the name is the pop ID for pop _x_
proj_N_mean_pop_x_: a dataframe of empirical (1990-1997) and projected (1998-2019)
population sizes for population _x_.
Column 1: the pop ID for population _x_
Columns 2-3: dummy variables; ignore
Columns 4-33: the population size in each year from 1990-2019 (columns
ordered by year beginning with 1990). From 1990-1997, this value is the
empirical census size; from 1998-2019, this is the MEAN population size
across replicate trajectories within a bootstrap run.
proj_N_medians_pop_x_: as described above for proj_N_mean_pop_x_, but this time the
values saved for years 1998-2019 are the MEDIAN population sizes across replicate
trajectories within a bootstrap run.
proj_N_sd_pop_x_: as described above for proj_N_mean_pop_x, but this time the values
saved are the standard deviation of the population sizes predicted across replicate
trajectories within a bootstrap run.
raw_trajectories_1pct_pop_x_: empirical (1990-1997) and predicted (1998-2019)
population sizes for population _x_ within each of 1,000 replicate projections
for 1% of the total number of bootstrap simulations run. Columns and contents
are as described above for proj_N_mean_pop_x_, except here column 3 contains the
ID number for a particular replicate trajectory within a bootstrap run. Turnover
from 1000 back to 1 indicates the end of one set of replicated trajectories
given a single sampling of VRR parameters and the start of a new replicate set
projected with a different suite of sampled parameters.
##########################################################################
fecunda_analysis_R1.Rmd
This R markdown code file summarizes the output of the demographic
simulations to make Figures 2, Figure 3, and Table 3.
It also combines the outcomes of the demographic simulations with
population genetic parameters and contemporary re-census data to test
for correlations among these metrics, and make Figures 4-5.
It depends upon the concatenated output files from step 4 as input
(all the *.csv files in this subdirectory), as well as the fecunda-quadrats.csv
and Song-MitchellOlds-2007-popgen.csv files located in the outermost level
of this archive (described above).
Running this code will save figures in the fecunda_archive/5-results/Figures/
subdirectory.
##########################################################################
fecunda_vrr_figs.Rmd
This R markdown code file uses the mean coefficient estimates for each
best-fit vital rate in each population and year to show the shapes of
vital rate functions, producing Supplementary Figure 2.
Its required input files are the model selection output .Rdata object
(for coefficient estimates) and the cleaned, long-format demography data
file (for the individual data points), both located in the fecunda_archive/4-ipm/
subdirectory.
Running this code will save figures in the fecunda_archive/5-results/Figures/VRRs/
subdirectory.
##########################################################################
fecunda_map.Rmd
This R markdown code file makes the local and regional maps of the study area
shown in Figure 1.
Its required input is the file of study site coordinates located in the outermost
level of this directory. It also requires that you put in a Google Maps API key
in order to download geographic data to make the maps, pasting it in where it says
"<>".
##########################################################################
##########################################################################
Figures/
This subdirectory is required as an output destination if you run the
code in step 5.
Because the figures are reported in-text, this subdirectory is deliberately
empty in the archive.
##########################################################################
VRRs/
There are a lot of components to Supplementary Figure 5; as such,
the vital rate figure has its own subdirectory to direct output to when
saving files.
Because the figures are reported in-text, this subdirectory is
deliberately empty in the archive.
##########################################################################
##########################################################################
##########################################################################