dimSums {magclass} | R Documentation |
Summation over dimensions
Description
This function sums over any (sub-)dimension of a magpie object
Usage
dimSums(x, dim = 3, na.rm = FALSE)
Arguments
x |
A MAgPIE-object |
dim |
The dimensions(s) to sum over. A vector of dimension codes or dimension names.
See |
na.rm |
logical. Should missing values (including NaN) be omitted from the calculations? |
Value
A MAgPIE object with values summed over the specified dimensions
Author(s)
Jan Philipp Dietrich
See Also
Examples
a <- maxample("animal")
dimSums(a, dim = c(1, 2, 3.2))
dimSums(a, dim = c("x", "y", "cell", "month"))
[Package magclass version 6.13.2 Index]