deseason: Create seasonal anomalies

deseasonR Documentation

Create seasonal anomalies

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

## 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 Raster* object or, alternatively, a numeric time series.

cycle.window

integer, defaults to 12. The window for the creation of the anomalies.

use.cpp

logical, defaults to FALSE. Determines whether or not to use Rcpp functionality. Only applies if x is a Raster* object.

filename

character. Output filename (optional).

...

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

Value

If x is a Raster* object, a deseasoned RasterStack; else a deseasoned numeric vector.

See Also

anomalize, denoise

Examples

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)

environmentalinformatics-marburg/remote documentation built on July 5, 2023, 4:36 p.m.