Creates a higher dimensional array by separating all subdimensions in the third dimension of a MAgPIE object and returning them as separate dimension.
See also
Other MAgPIE-Conversions:
as.RasterBrick(),
as.SpatRaster(),
as.SpatRasterDataset(),
as.SpatVector(),
as.array-methods,
as.data.frame-methods,
as_tibble.magpie(),
wrap()
Examples
a <- as.magpie(array(1:6, c(3, 2), list(c("bla", "blub", "ble"), c("up", "down"))))
unwrap(a)
#> , , bla, up
#>
#> [,1]
#> GLO 1
#>
#> , , blub, up
#>
#> [,1]
#> GLO 2
#>
#> , , ble, up
#>
#> [,1]
#> GLO 3
#>
#> , , bla, down
#>
#> [,1]
#> GLO 4
#>
#> , , blub, down
#>
#> [,1]
#> GLO 5
#>
#> , , ble, down
#>
#> [,1]
#> GLO 6
#>