plot_raw: Plot raw data and the fitted model for the selected set of...

Description Usage Arguments Value Examples

Description

plot_raw Plots raw data and fitted models for a specified set of studies.

Usage

1
2
plot_raw(data, temperature = FALSE, precipitation = FALSE,
  phenology = FALSE, morphology = FALSE, condition, id_to_do)

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).

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.

id_to_do

A list of study ids for which to plot the raw data and fitted models.

Value

A plot showing the raw data points and fitted models for a specified subset of studies.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
pdf('./test_sel.pdf', height = 10, width = 7)
par(oma = c(2, 2, 0, 0), mar = c(1, 2, 3, 1))
plot_raw(data = dat_Sel, temperature = TRUE,
         precipitation = FALSE, phenology = TRUE,
         morphology = FALSE, condition = '3',
         id_to_do = c(1:19))
dev.off()

pdf('./test_traits.pdf', height = 10, width = 7)
par(oma = c(2, 2, 0, 0), mar = c(1, 2, 3, 1))
plot_raw(data = dat_Trait, temperature = TRUE,
         precipitation = FALSE, phenology = TRUE,
         morphology = FALSE, condition = '2',
         id_to_do = c(1:20))
dev.off()

## End(Not run)

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