add_dimension: add_dimension

View source: R/add_dimension.R

add_dimensionR Documentation

add_dimension

Description

Function adds a name dimension as dimension number "dim" with the name "add" with an empty data column with the name "nm".

Usage

add_dimension(x, dim = 3.1, add = NULL, nm = "dummy")

Arguments

x

MAgPIE object which should be extended.

dim

The dimension number of the new dimension (e.g. 3.1)

add

The name of the new dimension

nm

The name of the first entry in dimension "add".

Value

The extended MAgPIE object

Author(s)

Jan Philipp Dietrich, Benjamin Bodirsky

See Also

add_columns,mbind

Examples


a <- maxample("animal")
str(add_dimension(a, dim = 3.2))
str(add_dimension(a, dim = 2.3, nm = paste0("d", 1:3)))

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