View source: R/aggregateForPlot.R
aggregateForPlot | R Documentation |
Aggregates Data for an area chart. The value of all underlying regions/years/timesteps are added to the value of the current region/year/timestep.
aggregateForPlot(plotdata,
dimension="region",regionPlotorder=NULL)
plotdata |
An MAgPIE object |
dimension |
by "region", "name" or "year" |
regionPlotorder |
allows to change the order of the regions by giving a vector with the order |
A MAgPIE object of the same dimensions as plotdata
Benjamin Bodirsky
## Not run:
data(population_magpie)
#no aggregation
scratch_plot(population_magpie[,,2])
#aggregation
scratch_plot(aggregateForPlot(population_magpie[,,2],regionPlotorder=c(10,1:9)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.