dimOrder | R Documentation |
Changes the order of the sub-dimension in a magpie object similar to unwrapping and applying the aperm command, but more efficient.
dimOrder(x, perm, dim = 3)
x |
magpie object |
perm |
vector with the new order of the sub-dimension. Missing sub-dimensions will added automatically at the end |
dim |
main dimension in which the order of sub-dimensions should be changed (1, 2 or 3) |
magpie object
Jan Philipp Dietrich, Benjamin Leon Bodirsky
a <- maxample("animal")
head(a)
head(dimOrder(a, perm = 3:1, dim = 1))
head(dimOrder(a, perm = c(2,1,3), dim = 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.