magclass (version 4.107.0)

new.magpie: new.magpie

Description

Creates a new MAgPIE object

Usage

new.magpie(cells_and_regions = "GLO", years = NULL, names = NULL,
  fill = NA, sort = FALSE, sets = NULL, unit = "unknown")

Arguments

cells_and_regions

Either the region names (e.g. "AFR"), or the cells (e.g. 1:10), or both in combination (e.g. "AFR.1"). NULL means no spatial element.

years

dimnames for years in the format "yXXXX" or as integers. NULL means one year which is not further specified

names

dimnames for names. NULL means one data element which is not further specified

fill

Default value for the MAgPIE object

sort

Bolean. Decides, wheher output should be sorted or not.

sets

A vector of dimension names. See getSets for more information.

unit

A character which sets the MAgPIE object's unit field in its metadata atrribute

Value

an empty magpie object filled with fill, with the given dimnames

See Also

as.magpie

Examples

Run this code
# NOT RUN {
 a <- new.magpie(1:10,1995:2000)
 b <- new.magpie(c("AFR","CPA"),"y1995",c("bla","blub"),sets=c("i","t","value"))
 c <- new.magpie()

# }

Run the code above in your browser using DataLab