View source: R/get_data.R View source: R/get_data.R
getData | R Documentation |
Extracts information from scenario objects, based on filters.
getData(
scen,
name = NULL,
...,
merge = FALSE,
process = FALSE,
parameters = TRUE,
variables = TRUE,
ignore.case = TRUE,
newNames = NULL,
newValues = NULL,
na.rm = FALSE,
digits = NULL,
drop.zeros = FALSE,
add_weights = "auto",
add_period_length = "auto",
apply_weights = FALSE,
apply_period_length = FALSE,
asTibble = TRUE,
as_data_table = FALSE,
stringsAsFactors = FALSE,
yearsAsFactors = FALSE,
drop_duplicated_scenarios = TRUE,
scenNameInList = as.logical(length(scen) - 1),
verbose = FALSE
)
get_data(
scen,
name = NULL,
...,
merge = FALSE,
process = FALSE,
parameters = TRUE,
variables = TRUE,
ignore.case = TRUE,
newNames = NULL,
newValues = NULL,
na.rm = FALSE,
digits = NULL,
drop.zeros = FALSE,
add_weights = "auto",
add_period_length = "auto",
apply_weights = FALSE,
apply_period_length = FALSE,
asTibble = TRUE,
as_data_table = FALSE,
stringsAsFactors = FALSE,
yearsAsFactors = FALSE,
drop_duplicated_scenarios = TRUE,
scenNameInList = as.logical(length(scen) - 1),
verbose = FALSE
)
scen |
Object scenario or list of 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. |
digits |
if integer, indicates the number of decimal places for rounding, if NULL - no actions. |
drop.zeros |
logical, should rows containing zero values be filtered out. |
asTibble |
logical, if the data.frames should be converted into tibbles. |
stringsAsFactors |
logical, should the sets values be converted to factors? |
yearsAsFactors |
logical, should |
scenNameInList |
logical, should the name of the scenarios be used if not provided in the list with several scenarios? |
verbose |
## Not run:
data("utopia_scen_BAU.RData")
getData(scen, name = "pDemand", year = 2015, merge = TRUE)
getData(scen, name = "vTechOut", comm = "ELC", merge = TRUE, year = 2015)
elc2050 <- getData(scen, parameters = FALSE, comm = "ELC", year = 2050)
names(elc2050)
elc2050$vBalance
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.