Join us for
RADAR: AI Edition

iki.dataclim (version 1.0)

createClimdex: Create a climdex.pcic::climdexInput from a dataclim object

Description

This function creates a climdex.pcic::climdexInput object from a dataclim object.

Usage

createClimdex(myDataclim, basePeriod)

Arguments

myDataclim
A dataclim object.
basePeriod
A numeric vector containing the years of the base period, e.g. 1961:1990. The basePeriod is used for the computation of the quantile threshold needed for some indices in the climdex.pcic package. If NULL (the default), the basePeriod will be extracted from the respective slot of the dataclim object.

Value

A climdexInput object.

Details

This is a simple wrapper to convert a dataclim object to a climdexInput object. Note that if basePeriod is not a sequence of consecutive years, the range min(basePeriod):max(basePeriod) will be input to the climdex.pcic computations.

See Also

climdex.pcic-package

Examples

Run this code
data(potsdam)
date <- as.Date(potsdam$date)
myDataclim <- createDataclim(date=date, tmin=potsdam$tmin, tmax=potsdam$tmax,
                          prec=potsdam$prec, basePeriod=1981:2010)
myClimdex <- createClimdex(myDataclim, 1981:2010)

Run the code above in your browser using DataLab