# Generate hourly temperatures for the example dataset
library(magrittr)
library(dplyr)
library(lubridate)
Weather <- Tudela_DW %>%
filter (Tudela_DW$Year==2003)
Tudela_HT <- hourly_temps(Weather,42.13132)
# Calculate GDH using default threshold temperatures
GDH_default <- GDH_asymcur(Tudela_HT)
# Calculate GDH using as custom set temperature thresholds
# Tb=4.5, Topt=22 and Tcrit=32
GDH_custom <- GDH_asymcur(Tudela_HT, 4.5, 22, 32)
Run the code above in your browser using DataLab