runtnd: Running trends on time windows of different lengths

View source: R/clitools.R

runtndR Documentation

Running trends on time windows of different lengths

Description

This function plots running trends on time windows of different lengths in a colored grid with axis 'Last year' and 'Window length'.

Usage

  runtnd(d, anyi, minyr=10, units='Units', pernyr=10, stname=NA, k=NULL,
  palneg=c('blue','white'), palpos=c('white','red'), ...)

Arguments

d

Series of annual values (without missing data).

anyi

Initial year of the series.

units

Units label for the legend.

minyr

Minimum no. of years to compute trends (10 by default).

pernyr

Factor for trend units (per 10 years by default).

stname

Station name (for the title).

k

Vector of breaks for the trend scale colors (automatically set by default).

palneg

Color gradation for negative trends [c('blue','white')].

palpos

Color gradation for positive trends [c('white','red')].

...

Additional graphic parameters.

Details

The input must be a complete (no missing data) series of annual values.

If minyr is negative, running trends calculated on -minyr years will be plotted, with increasing line widths when significance reaches 0.10 and 0.05 levels. Otherwise, a colored graphic of running trends calculated on different window widths will be displayed, masking low significance values with white dots.

Value

A data frame or a list with tnd (trends) and pvl (p-values) is returned invisibly when minyr is negative or positive, respectively.

Examples

data(climatol_data)
runtnd(Tav, 1901, -30, units='C', stname='Oslo', cex.axis=1.2, cex.lab=1.2)
runtnd(Tav[31:120], 1931, 30, units='C', stname='Oslo')

climatol documentation built on June 22, 2024, 11:07 a.m.

Related to runtnd in climatol...