bio2: bio2: Calculates mean annual diurnal temperature range

Description Usage Arguments Details Value See Also Examples

Description

bio2 is used to calculate the mean annual diurnal range in temperature (range mean of the maximum-minimum).

Usage

1
bio2(temps, tme, method = "")

Arguments

temps

a vector of temperatures, normally for one year (see details).

tme

a POSIXlt object representing the date and time of each temps value.

method

an optional character string describing the method used to mean annual diurnal temperature range. Options are "anuclim" or unspecified (see details).

Details

If using anuclim method and data span more than one year, data are aggregated by unique month irrespective of year and one value returned. If method is "anuclim" temperatures are aggregated by month and spline intepolated to weekly before mean diurnal temperature range is calculated, replicating the method used by http://www.worldclim.org/. If left unspecified and time interval is <= daily, the mean difference between the daily maximum and minimum values is calculated.

Value

a single numeric value of mean diurnal temperature range.

See Also

the tmecreate() function can be used to create a POSIXlt object.

Examples

1
2
3
4
5
temps <- 10 * sin(c(0:1459) / (pi * 150)) + rnorm(1460)
tme <- tmecreate(2010, 6)
plot(temps~as.POSIXct(tme), type = "l", xlab = "Month", ylab = "Temperature")
bio2(temps, tme)
bio2(temps, tme, method = "anuclim")

ilyamaclean/climvars documentation built on June 19, 2019, 2:22 p.m.