R/thermalTime.R
thermalTimeHourly.Rd
Calculate thermal time using the hourly temperature (non daily temperature)
thermalTimeHourly(timestamp, temperature, x_temp, y_temp)
A data frame with daily thermal time
met_file <- system.file("extdata/WeatherHourly.csv", package = "weaana")
hourly <- read.csv(met_file, as.is = TRUE)
hourly$timestamp <- as.POSIXct(hourly$timestamp, format = "%Y-%m-%dT%H:%M:%SZ")
x_temp <- c(0, 20, 35)
y_temp <- c(0, 20, 0)
thermalTimeHourly(hourly$timestamp, hourly$temperature, x_temp, y_temp)
#> # A tibble: 43 × 2
#> date value
#> <date> <dbl>
#> 1 2017-12-20 16.3
#> 2 2017-12-21 14.0
#> 3 2017-12-22 12.9
#> 4 2017-12-23 12.7
#> 5 2017-12-24 15.3
#> 6 2017-12-25 14.4
#> 7 2017-12-26 12.4
#> 8 2017-12-27 12.1
#> 9 2017-12-28 11.6
#> 10 2017-12-29 13.9
#> # ℹ 33 more rows