% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ensuredim.R
\name{ensuredim}
\alias{ensuredim}
\alias{drop1d}
\title{Enforce array and convert to vector if appropriate}
\usage{
ensuredim(x)

drop1d(x, drop = TRUE)
}
\arguments{
\item{x}{vector (or array)}

\item{drop}{if \code{TRUE}, 1d arrays are converted into vectors}
}
\value{
\code{esuredim} array of at least one dimension

\code{drop1d} vector, if \code{x} had only 1 dimension
}
\description{
\code{ensuredim} turns vectors into 1d-arrays, and leaves arrays unchanged. \code{drop1d} is the
inverse: it converts 1d arrays into vectors.
}
\author{
Claudia Beleites
}
