aggregateForPlot: aggregateForPlot

View source: R/aggregateForPlot.R

aggregateForPlotR Documentation

aggregateForPlot

Description

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.

Usage

aggregateForPlot(plotdata,
dimension="region",regionPlotorder=NULL)

Arguments

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

Value

A MAgPIE object of the same dimensions as plotdata

Author(s)

Benjamin Bodirsky

Examples

## 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)

pik-piam/luplot documentation built on Jan. 29, 2025, 12:30 a.m.