accumulation_level: Correlation between a chronology and climate data at...

Description Usage Arguments Value Methods (by generic) Examples

View source: R/climatology.R

Description

The climate data is accumulated (eg. summed or averaged) over varying window sizes (from 1 to window size set with "accumulation") and correlations with a given chronology are calculated ("spearman" by default, but can be set).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
accumulation_level(
  crn,
  climate.data,
  accumulation,
  accumfun = sum,
  months = c(-2:10),
  method = "spearman"
)

## S3 method for class 'accumulation_level'
plot(accumulation_level_object, main = "accumulation level")

Arguments

crn

A chronology - the first column is used by the function, make sure to give the right input (in case multiple chronologies are in one object, e.g. as for AR-chronologies).

climate.data

climate data in "wide format" with years in the first column and monthly climate measurement in the consecutive 12 columns.

accumulation

an integer specifying up to which window size accumulations get calculated.

accumfun

function to use for accumulation of the climate measure within the window.

months

an integer sequence selecting the end months of the windows to use. 1:5 selects jan to may of the "current" years as end months. to select months of the "previous" years use negative integers - c(-2:10) selects last years October to current years October as end months. Selection needs to be within c(-11:12).

method

method to calculate correlations - "pearson", "kendall" or "spearman".

accumulation_level_object

an object obtained by accumulation_level.

main

a plot title

Value

a matrix with the same number of rows as selected aggregation levels (argument "aggregation") and columns as the selection of end-months.

Methods (by generic)

Examples

1
# not available in development version

konradmayer/trlboku documentation built on July 3, 2020, 9:49 p.m.