plot_sel_per_id: Plot selection data and WMS per each study id

Description Usage Arguments Value Examples

Description

plot_sel_per_id Plots raw selection data and an estimate of WMS for a single study id in the dataset. Plot also visualizes the p value for the fit of the model.

Usage

1
2
plot_sel_per_id(data, temperature = FALSE, precipitation = FALSE,
  phenology = FALSE, morphology = FALSE, id, condition)

Arguments

data

A dataframe containing per each study the time series of relevant variables (i.e. yearly climate values, yearly trait values or yearly selection differentials) to be analyzed.

temperature

A boolean indicating if the temperature data should be extracted (default is FALSE).

precipitation

A boolean indicating if the precipitation data should be extracted (default is FALSE).

phenology

A boolean indicating if the phenological data should be extracted (default is FALSE).

morphology

A boolean indicating if the morphological data should be extracted (default is FALSE).

id

A character specifying the unique study id.

condition

A character specifying which condition is to be tested (for more details see Radchuk et al. (in review)):

  • '1' - Condition 1 (effect of year on climate);

  • '2' - Condition 2 (effect of climate on traits);

  • '3' - Condition 3 (testing whether weighted mean selection over years differs from 0);

  • '2b' - Condition 2, but also with abundance included as a predictor;

  • '3b' - testing whether selection changes over years.

Value

A plot showing the raw selection data and an estimate of WMS.

Examples

1
2
3
plot_sel_per_id(data = dat_Sel, temperature = TRUE,
                precipitation = FALSE, phenology = TRUE,
                morphology = FALSE, id = '1', condition = '3')

radchukv/adRes documentation built on June 1, 2019, 7:05 p.m.