% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/addDim.R
\name{add_dimension}
\alias{add_dimension}
\title{add_dimension}
\usage{
add_dimension(x, dim = 3.1, add = NULL, nm = "dummy", expand = TRUE)
}
\arguments{
\item{x}{MAgPIE object which should be extended.}

\item{dim}{The dimension number of the new dimension (e.g. 3.1)}

\item{add}{The name of the new dimension}

\item{nm}{One or more names of items in the new dimension.}

\item{expand}{If TRUE, each item from the item argument is added to each item
already present, resulting in e.g. `c("A.d1", "B.d1", "A.d2", "B.d2")`.
Otherwise, length of item must equal the number of items already present and
they are simply added, resulting in e.g. `c("A.d1", "B.d2")`.}
}
\value{
The extended MAgPIE object
}
\description{
This function adds a named dimension as dimension number "dim" with
the name "add" with an empty data column with the name "nm".
Please start using this function's successor \code{\link{addDim}}. add_dimension
might eventually become deprecated.
}
\examples{

a <- maxample("animal")
str(addDim(a, dim = 3.2))
str(addDim(a, dim = 2.3, item = paste0("d", 1:3)))
}
\seealso{
\code{\link{add_columns}},\code{\link{mbind}}

Other DimensionManipulation: 
\code{\link{add_columns}()},
\code{\link{collapseDim}()},
\code{\link{collapseNames}()},
\code{\link{dimCode}()},
\code{\link{dimOrder}()},
\code{\link{dimReduce}()}
}
\author{
Jan Philipp Dietrich, Benjamin Bodirsky, Pascal Sauer
}
