deseason: Create seasonal anomalies

Description Usage Arguments Value See Also Examples

Description

The function calculates anomalies of a RasterStack by supplying a suitable seasonal window. E. g. to create monthly anomalies of a raster stack of 12 layers per year, use cycle.window = 12.

Usage

1
2
3
4
5
6
## S4 method for signature 'RasterStackBrick'
deseason(x, cycle.window = 12L,
  use.cpp = FALSE, filename = "", ...)

## S4 method for signature 'numeric'
deseason(x, cycle.window = 12L)

Arguments

x

An object of class 'RasterStack' (or 'RasterBrick') or, alternatively, a 'numeric' time series.

cycle.window

Integer. The window for the creation of the anomalies.

use.cpp

Logical. Determines whether or not to use Rcpp functionality, defaults to TRUE. Only applies if x is a 'RasterStack' (or 'RasterBrick') object.

filename

character. Output filename (optional).

...

Additional arguments passed on to writeRaster, only considered if filename is specified.

Value

If x is a 'RasterStack' (or 'RasterBrick') object, a deseasoned 'RasterStack'; else a deseasoned 'numeric' vector.

See Also

anomalize, denoise

Examples

1
2
3
4
5
6
7
8
data("australiaGPCP")

aus_dsn <- deseason(australiaGPCP, 12)

opar <- par(mfrow = c(1,2))
plot(australiaGPCP[[1]], main = "original")
plot(aus_dsn[[1]], main = "deseasoned")
par(opar)

Example output

Loading required package: Rcpp
Loading required package: raster
Loading required package: sp

remote documentation built on May 1, 2019, 11:30 p.m.