% Generated by roxygen2: do not edit by hand
\name{dim}
\alias{dim}
\title{Get or Set the Dimensions of an Object}
\arguments{
  \item{x}{an R object for which the dimensions should be retrieved or set
}
}

\details{
Get dimensions of a matrix
\code{
A <- matrix(1:6, nrow = 2, ncol = 3)
dim(A)  # dimensions of the matrix
}

Set dimensions of a vector
\code{
v <- 1:6
dim(v) <- c(2, 3)  # set dimensions of the vector
v  # now v is a 2x3 matrix
}}

