collapseNames: Collapse dataset names

View source: R/collapseNames.R

collapseNamesR Documentation

Collapse dataset names

Description

This function has been superseded by collapseDim which is a more generalized version of this function. Please use this one instead!

Usage

collapseNames(x, collapsedim = NULL, preservedim = NULL)

Arguments

x

MAgPIE object

collapsedim

If you want to remove the names of particular dimensions provide the dimensions here. Since the function only works in the third dimension, you have to count from there on (e.g. dim = 3.2 refers to collapsedim = 2). Alternatively, you can also specify the name of the dimension. Default: NULL. CAUTION with parameter collapsedim! You could also force him to remove dimnames, which are NOT the same for each element and so create duplicates in dimnames.

preservedim

If you want to remove the name of particular dimensions except some, you can specify the dimension(s) to preserve here. See collapsedim for naming convention. Note that preservedim will be ignored in the case, of a specified collapsedim

Details

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)

Value

The provided MAgPIE object with collapsed names

Author(s)

Jan Philipp Dietrich, David Klein, Xiaoxi Wang

See Also

collapseDim, getItems, "magpie"


magclass documentation built on May 29, 2024, 6:20 a.m.