Learn R Programming

magclass (version 3.74)

collapseNames: Collapse dataset names

Description

This function will remove names in the data dimension which are the same for each element (meaning that this data dimension contains exactly one element)

Usage

collapseNames(x,collapsedim=NULL)

Arguments

x
MAgPIE object
collapsedim
If you want to remove the names of particular dimensions provide the dimensions here. Default: NULL

Value

See Also

getNames, setNames, "magpie"

Examples

Run this code
 x <- new.magpie("GLO",2000,c("bla.a","bla.b"))  
 print(x)
 # An object of class "magpie"
 # , , bla.a
 #      y2000
 # GLO.1    NA
 # , , bla.b
 #      y2000
 # GLO.1    NA

 print(collapseNames(x))
 # An object of class "magpie"
 # , , a
 #      y2000
 # GLO.1    NA
 # , , b
 #      y2000
 # GLO.1    NA

Run the code above in your browser using DataLab