# create example object m1 from package demo files
exdir <- system.file("extdata", "examples", "theopp", package = "NMproject")
m1 <- new_nm(run_id = "m1",
based_on = file.path(exdir, "Models", "ADVAN2.mod"),
data_path = file.path(exdir, "SourceData", "THEOPP.csv"))
m2 <- m1 %>% child("m2")
m2WT <- m1 %>% child("m2WT")
if (FALSE) {
if(interactive()){
## a decision based on summary statistics
decision(
inputs = summary_wide(c(m1, m2, m2WT)),
outcome = "m1 is better"
) # next line must be end of chunk
## a decision based also on goodness of fit plots
decision(
inputs = summary_wide(c(m1, m2, m2WT)),
file_inputs = c(
"Results/basic_gof.m1.nb.html",
"Results/basic_gof.m2.nb.html"
),
outcome = "m1 is better"
) # next line must be end of chunk
## a decision based on an automatic TRUE/FALSE criteria
## here we're ensuring m1 has the lowest AIC
decision(AIC(m1) == min(AIC(m1, m2, m3)))
}
}
Run the code above in your browser using DataLab