R
This has to be run in order to compile this notebook while the R package is still under development.
In [1]:
Copied!
devtools::load_all()
devtools::load_all()
Error in loadNamespace(x): there is no package called ‘devtools’ Traceback: 1. withRestarts(stop(cond), retry_loadNamespace = function() NULL) 2. withOneRestart(expr, restarts[[1L]]) 3. doWithOneRestart(return(expr), restart) 4. stop(cond)
Installation¶
While the R package has not been released yet, you have to install it from GitHub source using:
devtools::install_github('IAMconsortium/scenario-validation-criteria')
Load functions¶
Instead of loading the data from these files manually, it is recommended to use the built-in load functions from the package via load_criteria. For instance, the following will load the definition of the thresholds values.
In [2]:
Copied!
load_criteria('criteria-thresholds')
load_criteria('criteria-thresholds')
Error in load_criteria("criteria-thresholds"): could not find function "load_criteria"
Traceback:
Multiple files can be loaded in one go.
In [3]:
Copied!
criteria <- load_criteria(c('criteria-thresholds', 'reference-data'))
criteria[['reference-data']]
criteria <- load_criteria(c('criteria-thresholds', 'reference-data'))
criteria[['reference-data']]
Error in load_criteria(c("criteria-thresholds", "reference-data")): could not find function "load_criteria"
Traceback:
Apply vetting criteria to scenarios¶
A tutorial on how to apply the vetting criteria to a list of scenarios based on piamValidation will be made available later.