Learn R Programming

magclass (version 3.74)

getSets: Get sets

Description

Extracts sets of a MAgPIE-object if available

Usage

getSets(x, fulldim=TRUE, sep=".") getSets(x, fulldim=TRUE, sep=".") <- value

Arguments

x
MAgPIE object
sep
A character separating joined dimension names
fulldim
bool: Consider dimension 3 as a possible aggregate of more dimensions (TRUE) or stick to it as one dimension (FALSE)
value
A vector with set names you want to replace the current set names of the object with.

Value

See Also

getRegions, getNames,getYears, getCPR, read.magpie, write.magpie, "magpie"

Examples

Run this code
 a <- new.magpie("GLO.1",2000,c("a.o1","b.o1","a.o2"))
 getSets(a) <- c("reg","cell","t","bla","blub")
 getSets(a)
 
 getSets(a)[4] <- "BLA"
 getSets(a,fulldim=FALSE)
 getSets(a)

Run the code above in your browser using DataLab