Description Usage Arguments Value Examples
generate temperature
1 | generate_temp(wk_list, start_date = "1980-01-01", end_date = "2010-12-31")
|
wk_list |
list of weekly parameters from temp_wk_list() function |
start_date |
"yyy-mm-dd" string for start date of simulated temperature |
end_date |
"yyy-mm-dd" string for end date of simulated temperature |
dataframe, that includes simulated minimum and maximum temperature
1 2 3 4 5 6 7 8 9 10 11 12 | wk_list <- temp_wk_list(wx_data)
test <- generate_temp(wk_list, "1980-01-01", "1982-12-31")
plot(test$Tmax_C, col = "red", type = "l")
lines(test$Tmin_C, col = "blue")
hist((test$Tmax_C-test$Tmin_C))
# testing
if (FALSE) {
test <- generate_temp(wk_list, "1980-01-01", "2079-12-31") # 30 sec to run
dplyr::summarize(test, Tmax_C = mean(Tmax_C), Tmin_C = mean(Tmin_C))
# compare to original data
dplyr::summarize(wx_data, Tmax_C = mean(Tmax_C), Tmin_C = mean(Tmin_C))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.