View source: R/showAreaAndBarPlotsPlus.R
showAreaAndBarPlotsPlus | R Documentation |
Automatically infers disaggregation of a variable using the '+'-notation and
calls showAreaAndBarPlots
.
showAreaAndBarPlotsPlus(
data,
tot,
plusNum = 1,
fill = FALSE,
mainReg = getOption("mip.mainReg"),
yearsBarPlot = getOption("mip.yearsBarPlot"),
scales = "free_y"
)
data |
A quitte object or an object that can be transformed into a quitte object. |
tot |
A single string. A total value to be shown in the area plots. |
plusNum |
A single number. Number of "+"symbols for disaggregation. |
fill |
Logical. Should the vars be normalized so that their values add to 1? (Plot shares instead of absolute values.) |
mainReg |
A single string. The plots for this region are shown enlarged.
Use |
yearsBarPlot |
A numeric vector. The years shown in the bar plots. Use
|
scales |
adjusts how axes are harmonized. Default is free_y |
The function requires data
to have a character column named
varplus
containing variable names that use the '+'-notaion. The
function searches for values in varplus
that start with tot
followed by "|"
, plusNum
-times "+"
, and "|"
.
These variables are then used in a call to showAreaAndBarPlots
.
NULL
is returned invisible.
## Not run:
options(mip.yearsBarPlot = c(2010, 2030, 2050, 2100))
options(mip.mainReg = "World")
data <- as.quitte(data)
showAreaAndBarPlotsPlus(data, "SE|Liquids")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.