runtnd | R Documentation |
This function plots running trends on time windows of different lengths in a colored grid with axis 'Last year' and 'Window length'.
runtnd(d, anyi, minyr=10, units='Units', pernyr=10, stname=NA, k=NULL,
palneg=c('blue','white'), palpos=c('white','red'), ...)
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 [ |
palpos |
Color gradation for positive trends [ |
... |
Additional graphic parameters. |
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.
A data frame or a list with tnd
(trends) and pvl
(p-values) is
returned invisibly when minyr
is negative or positive, respectively.
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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.