intFun.anom.mly: Monthly anomalies

Description Usage Arguments Value Examples

View source: R/intFun.R

Description

This function computes monthly anomalies.

Usage

1
intFun.anom.mly(mly, clim)

Arguments

mly

An R object with a monthly time series

clim

An R object with climatological monthly mean data

Value

A raster object with monthly anomalies

Examples

1
2
3
4
5
6
7
8
9
# make some data
month <- seq(1,12,1)
month <- rep(month,10)
mod <- runif(length(month), 0,10)
mod <- data.frame(month, mod)
# make an index
index <- list(mod$month)
clim.mly <- apply(mod, 2, function(x) {tapply(x, index, mean, na.rm=TRUE)})
mod.anom <- intFun.anom.mly(mod, clim.mly)

amber documentation built on Aug. 28, 2020, 5:08 p.m.