trade | R Documentation |
Calculates MAgPIE trade or self-sufficiencies out of a gdx file
trade(
gdx,
file = NULL,
level = "reg",
products = "k_trade",
product_aggr = FALSE,
attributes = "dm",
weight = FALSE,
relative = FALSE,
type = "net-exports"
)
gdx |
GDX file |
file |
a file name the output should be written to using write.magpie |
level |
Level of regional aggregation ("reg", "glo", "regglo") |
products |
Selection of products (either by naming products, e.g. "tece", or naming a set,e.g."kcr") |
product_aggr |
aggregate over products or not (boolean) |
attributes |
dry matter: Mt ("dm"), gross energy: PJ ("ge"), reactive nitrogen: Mt ("nr"), phosphor: Mt ("p"), potash: Mt ("k"), wet matter: Mt ("wm"). Can also be a vector. |
weight |
in case relative=T also the weighting for the self sufficiencies is provided as it is an intensive parameter |
relative |
if relative=TRUE, self sufficiencies are reported, so the amount of production divided by domestic demand |
type |
exports-imports ("net-exports"), gross imports ("imports") or gross exports ("exports"); only valid if relative=FALSE |
Trade definitions are equivalent to FAO CBS categories
trade (production-demand) as MAgPIE object; unit depends on attributes
Benjamin Leon Bodirsky, Florian Humpenoeder, Mishko Stevanovic
## Not run:
x <- trade(gdx="fulldata.gdx", level="regglo", products="kcr")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.