% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ndim.R
\name{ndim}
\alias{ndim}
\title{Count sub-dimensions}
\usage{
ndim(x, dim = NULL)
}
\arguments{
\item{x}{A MAgPIE-object}

\item{dim}{main dimension in which the sub-dimensions should be counted. If NULL
the sum of all subdimensions is returned}
}
\value{
Number of subdimensions
}
\description{
Functions to count the subdimensions of an
MAgPIE-object
}
\examples{

  a <- maxample("animal")
  ndim(a)
  ndim(a,1)
  ndim(a,2)
  ndim(a,3)

}
\seealso{
Other ObjectInfo: 
\code{\link{dimExists}()},
\code{\link{fulldim}()},
\code{\link{hasCoords}()},
\code{\link{hasSets}()},
\code{\link{is.temporal}()},
\code{\link{isYear}()},
\code{\link{ncells}()},
\code{\link{sameDims}()}
}
\author{
Jan Philipp Dietrich
}
\concept{ObjectInfo}
