forked from BennettForville/Bshiny2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
complicated_q10_code.R
32 lines (31 loc) · 944 Bytes
/
complicated_q10_code.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## code that did not work, from the q10 code, it is simplified in the actual shiny app called app.R
# RCP45 <- system.file("input/hector_ssp245.ini", package = "hector")
# core45 <- newcore(RCP45)
# run(core45)
# plot_data <- fetchvars(core45,2000:2200)
# shutdown(core45)
#
# # ggplot(plot_data, aes(year, value))+
# # geom_point()+
# # facet_wrap(~variable, scales = "free")+
# # ggtitle(input$Q10)
#
#
# run_with_param <- function(core, parameter, value) {
# old_value <- fetchvars(core, NA, parameter)
# unit <- as.character(old_value[["units"]])
# setvar(core, NA, parameter, value, unit)
# reset(core)
# run(core)
# result <- fetchvars(core, 2000:2200)
# result[["parameter_value"]] <- value
# result
# }
#
# x <- run_with_param(core45, Q10_RH(), input$Q10)
#
# ggplot(x, aes(year, value))+
# geom_point()+
# facet_wrap(~variable, scales = "free")
#
# })