treeclim-modifiers: Modifiers for climate parameter selection

Description Usage Arguments Examples

Description

These modifiers are used to select specific months from specific climate parameters, and potentially transform the selections into their respective sums or means. The modifiers can be chained together using '+'. .range corresponds to using all specified months separately, while .sum and .mean will use the sums and means of the specified months. These modifiers also allow to select specific climatic variables, addressed by name. Thus, .mean(4:8, "temp") will select the mean for climate parameter "temp" for the months April to August. Not only ranges, but also individual vectors can be used for month specification, like e.g., .range(c(1, 3, 4, 5).

The modifiers can be chained together using the '+' symbol, which makes it possible to create arbitrarily complex selections of climate parameters for calibration. E.g., .mean(2:5, "temp") + .sum(2:5, "prec") will yield the February-to-May mean for the variable "temp" and the sum of the variable "prec" for the same time. While there is no limitation for number of lists that can be chained together, 'dcc' will not check for meaningful specifications. Testing smart hypotheses is up the researcher.

Usage

1
2
3
4
5
.range(.months = NULL, .variables = NULL)

.mean(.months = NULL, .variables = NULL)

.sum(.months = NULL, .variables = NULL)

Arguments

.months

numeric identifiers for the months (-1 for previous January until 12 for current December, with -6 for previous June, etc.)

.variables

names of the variables the modifier shall be applied to

Examples

1
2
3
4
5
6
## Not run: 
my_calib <- dcc(rt_spruce, list(prec = rt_prec, temp = rt_temp),
  .range(4:9, "temp") + .mean(-5:-9, "temp") + .sum(3:10, "prec"))
plot(my_calib)

## End(Not run)

cszang/treeclim documentation built on Feb. 18, 2022, 4:54 a.m.