# the default method
set.seed(78)
tmax <- runif(50, 37, 47)
set.seed(79)
tmin <- runif(50, 31, 34)
crop_sensitive(tmax, tmin)
###############################################
# the array method
data("temp_dat", package = "climatrends")
# use the default thresholds
crop_sensitive(temp_dat,
day.one = "2013-10-27",
last.day = "2013-11-04")
# or change the thresholds based on the crop physiology
crop_sensitive(temp_dat,
day.one = "2013-10-27",
last.day = "2013-11-04",
hts_mean.threshold = c(24),
hts_max.threshold = c(31, 33))
Run the code above in your browser using DataLab