bio1: bio1: Calculates mean annual temperature

Description Usage Arguments Details Value See Also Examples

Description

bio1 is used to calculated mean annual temperature.

Usage

1
bio1(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. Ignored if method unspecified.

method

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

Details

If method is "anuclim" temperatures are aggregated by month, and spline intepolated to weekly before mean annual temperature is calculated, replicating the method used by http://www.worldclim.org/. If method is "dailymaxmin", daily mean temperatures are calculated as the mean of daily maximum and minimum temperatures and annual mean calculated from daily means. Otherwise the mean of temps is returned. 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 using dailymaxmin method and data span more than one year, calculations will be performed on all data and a single value returned.

Value

a single numeric value of mean annual temperature.

See Also

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

Examples

1
2
3
4
5
6
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")
bio1(temps, tme)
bio1(temps, tme, method = "anuclim")
bio1(temps, tme, method = "dailymaxmin")

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