https://github.com/cran/pracma
Revision 26e049d70b4a1c237987e260cba68f6a9413736c authored by Hans W. Borchers on 09 April 2019, 04:10:07 UTC, committed by cran-robot on 09 April 2019, 04:10:07 UTC
1 parent bf07673
Tip revision: 26e049d70b4a1c237987e260cba68f6a9413736c authored by Hans W. Borchers on 09 April 2019, 04:10:07 UTC
version 2.2.5
version 2.2.5
Tip revision: 26e049d
ndims.Rd
\name{ndims}
\alias{ndims}
\title{Number of Dimensions}
\description{
Number of matrix or array dimensions.
}
\usage{
ndims(x)
}
\arguments{
\item{x}{a vector, matrix, array, or list}
}
\details{
Returns the number of dimensions as \code{length(x)}.
A vector is seen as a matrix with one row,
i.e. for a vector the number of dimensions is 2.
}
\value{
the number of dimensions in the vector or array \code{x}.
}
\seealso{
\code{\link{size}}
}
\note{
The result will differ from Matlab when \code{x} is a character vector.
}
\examples{
ndims(1:8)
ndims(array(1:8, c(2,2,2)))
}
\keyword{array}
Computing file changes ...