gdxAggregate | R Documentation |
aggregates and disaggregates on spatial scales using mappings from the gdx files. Very specific to MAgPIE.
gdxAggregate(gdx, x, weight = NULL, to, absolute = TRUE, dir = ".", ...)
gdx |
gdx file |
x |
object to be aggrgeagted or disaggregated |
weight |
weight can be either an object or a functionname in "", where the function provides the weight |
to |
options: grid, cell, iso, reg, glo, regglo |
absolute |
is it a absolute or a relative value (absolute: tons, relative: tons per hectare) |
dir |
for gridded outputs: magpie output directory which containts clustermap*.rds files for disaggregation. |
... |
further parameters handed on to weight function. |
List of magpie objects with results on country level, weight on country level, unit and description.
Benjamin Leon Bodirsky, Edna J. Molina Bacca, Florian Humpenoeder
## Not run:
gdp_pc <- income(gdx, level = "reg")
is.function(population)
gdp_pc_iso <- gdxAggregate(gdx = gdx, x = gdp_pc, weight = "population", to = "iso",
absolute = FALSE)
gdp_pc_glo <- gdxAggregate(gdx = gdx, x = gdp_pc, weight = "population", to = "glo",
absolute = FALSE)
gdp <- income(gdx, level = "reg", per_capita = FALSE)
gdp_iso <- gdxAggregate(gdx = gdx, x = gdp, weight = "population", to = "iso", absolute = TRUE)
gdp_glo <- gdxAggregate(gdx = gdx, x = gdp, weight = "population", to = "glo", absolute = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.