add_dimension {magclass} | R Documentation |
Function adds a name dimension as dimension number "dim" with the name "add" with an empty data column with the name "nm".
add_dimension(x, dim = 3.1, add = NULL, nm = "dummy")
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". |
The extended MAgPIE object
Jan Philipp Dietrich, Benjamin Bodirsky
a <- maxample("animal")
str(add_dimension(a, dim = 3.2))
str(add_dimension(a, dim = 2.3, nm = paste0("d", 1:3)))