Extracts information from scenario objects, based on filters.
getData( scen, name = NULL, ..., merge = FALSE, process = FALSE, parameters = TRUE, variables = TRUE, ignore.case = FALSE, newNames = NULL, newValues = NULL, na.rm = FALSE, drop = FALSE, asTibble = TRUE, stringsAsFactors = FALSE, yearsAsFactors = FALSE, scenNameInList = as.logical(length(scen) - 1), verbose = FALSE )
scen | Object scenario or list with scenarios. |
---|---|
name | character vector with names of parameters and/or variables. |
... | filters for various sets (setname = c(val1, val2) or setname_ = "matching pattern"), see details. |
merge | if TRUE, the search results will be merged in one dataframe; the named list will be returned if FALSE. |
process | if TRUE, dimensions "tech", "stg", "trade", "imp", "expp", "dem", and "sup" will be renamed with "process". |
parameters | if TRUE, parameters will be included in the search and returned if found. |
variables | if TRUE, variables will be included in the search and returned if found. |
ignore.case | grepl parameter if regular expressions are used in '...' or 'name_'. |
newNames | renaming sets, named character vector or list with new names as values, and old names as names - the input parameter to renameSets function. The operation is performed before merging the data (merge parameter). |
newValues | revalue sets, named character vector or list with new values as values, and old values as names - the input parameter to revalueSets function. The operation is performed after merging the data (merge parameter). |
na.rm | if TRUE, NA values will be dropped. |
drop | if TRUE, the sets with only one unique value will be dropped (not implemented) |
asTibble | logical, if the data.frames should be converted into tibbles. |
stringsAsFactors | logical, should the sets values be converted to factors? |
yearsAsFactors | logical, should years be converted to factors? Set 'year' is integer by default. |
scenNameInList | logical, should the name of the scenarios be used if not provided in the list with several scenarios? |