bio7: bio7: Annual temperature range

Description Usage Arguments Details Value See Also Examples

Description

bio7 is used to calculate the annual range in temperature

Usage

1
bio7(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 calculate maximum and minimum temperatures. Options are "anuclimmean", "anuclimmax" or unspecified (see details).

Details

If method is "anuclimmean", mean monthly temperatures are spline interpolated to a weekly time period and range calculated from the maximum and minimum weeekly temperature values. If method is "anuclimmaxmin", maximum and minimum monthly temperatues are spline interpolated to a weekly time period and range is calculated from the maximum and minimum mean weekly temperature values. If left unspecified, the range is calculated by subtracting the maximum and minimum temperature alues for each year. To satisfy the requirements for tme, a POSIXlt object can be created using the tmecreate wrapper function. This calculation should return the value of bio5(temps, tme)-bio6(temps, tme) when methods remain the same.

Value

a single numeric value of annnual temperature range (maximum-minimum temperature values).

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")
bio7(temps, tme)
bio7(temps, tme, method = "anuclimmean")
bio7(temps, tme, method = "anuclimmaxmin")

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