% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getDim.R
\name{getDim}
\alias{getDim}
\title{getDim}
\usage{
getDim(elems, x, fullmatch = FALSE, dimCode = TRUE)
}
\arguments{
\item{elems}{A vector of characters containing the elements that should be
found in the MAgPIE object}

\item{x}{MAgPIE object in which elems should be searched for.}

\item{fullmatch}{If enabled, only dimensions which match exactly the elements
provided will be returned. Otherwise, it is sufficient if elems contains a subset
of the dimension.}

\item{dimCode}{If enabled, the dimCode will be returned, otherwise the name
of the dimension.}
}
\value{
The name or dimCode of the dimensions in which elems were found.
}
\description{
Function which tries to detect the dimension to which the given elems belong
}
\examples{

pop <- maxample("pop")
getDim(c("AFR", "CPA"), pop)
 getDim(c("AFR", "CPA"), pop, fullmatch = TRUE)
 getDim(c("AFR", "CPA"), pop, dimCode = FALSE)

}
\seealso{
\code{\link{mcalc}},\code{\link{dimCode}}

Other GetterSetter: 
\code{\link{getCPR}()},
\code{\link{getCells}()},
\code{\link{getComment}()},
\code{\link{getCoords}()},
\code{\link{getItems}()},
\code{\link{getNames}()},
\code{\link{getRegionList}()},
\code{\link{getRegions}()},
\code{\link{getSets}()},
\code{\link{getYears}()},
\code{\link{setItems}()},
\code{\link{setNames-methods}}
}
\author{
Jan Philipp Dietrich
}
\concept{GetterSetter}
