View source: R/compute.indices.R
compute.climdex.indices | R Documentation |
Compute Climdex indices using provided data.
compute.climdex.indices(in.dat, cdx.funcs, ts, base.range, metadata.config)
in.dat |
The input data to compute indices on. |
cdx.funcs |
The functions to be applied to the data, as created by |
ts |
The associated time data, as created by |
base.range |
The base range; a vector of two numeric years. |
metadata.config |
object containing the relevant metadata configuration information. |
Given the provided data and functions, compute the Climdex indices defined by the functions.
A list of data for each index.
library(climind) ## Prepare input data in.dat <- list(tmax=ec.1018935.tmax$MAX_TEMP) cdx.funcs <- get.climdex.functions(get.climdex.variable.list(names(in.dat))) in.dat$northern.hemisphere <- TRUE ts <- as.PCICt(do.call(paste, ec.1018935.tmax[,c("year", "jday")]), format="%Y %j", cal="gregorian") ## Compute indices res <- compute.climdex.indices(in.dat, cdx.funcs, ts, c(1981, 1990), FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.