bio5: bio5: Calculates maximum temperature of the warmest period of...

Description Usage Arguments Details Value See Also Examples

Description

bio5 is used to calculate the maximum weekly or monthly temperature in each year

Usage

1
bio5(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 to calculate maximum temperature in the warmest period. 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 the maximum weekly value returned. If method is "anuclimmax", monthly maximum temperatures are spline interpolated to a weekly time period and the maximum weekly value returned. If method is unspecified, the maximum temperature across all values for each year is returned.

Value

a single numeric value of maximum temperature (weekly or monthly) for each year.

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

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