magclass (version 4.107.0)

dimOrder: dimOrder

Description

Changes the order of the 3rd dimension in a magpie object similar to unwrapping and applying the aperm command, but more efficient.

Usage

dimOrder(x, perm)

Arguments

x

magpie object

perm

vector with the new order of the 3rd dimension

Value

magpie object

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
data("population_magpie")
x<-setNames(population_magpie,c("kj","kej"))*population_magpie
dimOrder(x=x,perm=c(2,1))
# }

Run the code above in your browser using DataCamp Workspace