mcalc | R Documentation |
Select values from a MAgPIE-object
mcalc(x, f, dim = NULL, append = FALSE)
x |
MAgPIE object |
f |
A formula describing the calculation that should be performed |
dim |
The dimension in which the manipulation should take place. If set to NULL function tries to detect the dimension automatically. |
append |
If set to TRUE the result will be appended to x, otherwise the result will be returned. |
This functions only work for MAgPIE objects with named dimensions as the dimension name (set_name) has to be used to indicate in which dimension the entries should be searched for!
The calculated MAgPIE object in the case that append is set to FALSE. Otherwise nothing is returned (as x is appended in place)
Jan Philipp Dietrich
mselect
pop <- maxample("pop")
pop
mcalc(pop, X12 ~ A2 * B1, append = TRUE)
pop
mcalc(pop, `Nearly B1` ~ 0.5 * A2 + 99.5 * B1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.