magpie2raster: Convert MAgPIE object to raster

Description Usage Arguments Value Author(s) Examples

View source: R/magpie2raster.R

Description

MAgPIE object with a resolution of 0.5x0.5 deg and 59199 cells is converted to raster data. Data with several years will be converted to a RasterStack, data with several data dimensions to a list of RasterLayers or RasterStacks.

Usage

1

Arguments

x

A MAgPIE object

Value

A RasterLayer/-Stack or a list of such

Author(s)

Ulrich Kreidenweis

Examples

1
2
3
4
5
6
7
## Not run: 
a <- new.magpie(cells_and_regions = paste(magclass:::magclassdata$half_deg$region,1:59199,sep="."),
                years = c(2000,2005), names = c("crop", "past"), fill = rnorm(59199*4))
r <- magpie2raster(a)
r

## End(Not run)

pik-piam/geodata documentation built on Nov. 5, 2019, 12:21 a.m.