query_master(db, time, col, prop, columns = "name", time.range = NULL, filter = NULL, phase = 4)query_interval(db, ...)query_day(db, ...)query_week(db, ...)query_month(db, ...)query_year(db, ...)sum_master(db, time, col, prop, columns = "name", time.range = NULL, filter = NULL, phase = 4)sum_interval(db, ...)sum_day(db, ...)sum_week(db, ...)sum_month(db, ...)sum_year(db, ...)
name
)time
)A data frame that contains data summarized/aggregated by scenario.
This collection of functions retrieves data from the processed PLEXOS solutions and returns it in a convenient format.
The family query_*
returns the raw data in the databases, while sum_*
aggregates the data according to columns
.
The functions *_day
, *_week
, *_month
and *_year
are
shortcuts for the corresponding, *_master
function.
The following is a list of valid items for columns
and filtering. Additionally,
time
can be specified for summary data (interval data always includes time
).
category
property
name
(default for columns)
parent
(automatically selected when name
is selected)
category
region
(only meaningful for generators)
zone
(only meaningful for generators)
period_type
band
sample
timeslice
If defined, the filter
parameter must be a list
. The elements must be chracter
vectors and need to have a valid column name (see previous bullet points). For example, one
could define it as follows:
filter = list(name = c("Generator1", "Generator2"), region = "Region1")
To filter by time use the time.range
parameter, instead of adding it as an entry in the
filter
parameter.
If a scenario has multiple databases, the data will be aggregated automatically. If two or more
databases within the same scenario have overlapping time periods, the default is to select the
data from the last database (execute summary(db)
so see the order). To change this behavior
set the global option rplexos.tiebreak
to first
, last
, or all
to
select data from the first database, the last one or keep all of them.
Multiple properties can be queried within a collection. If prop
equals the widcard
"*"
, all the properties within a collection are returned.
plexos_open
to create the PLEXOS database object