% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_linear_algebra.R
\name{vec}
\alias{vec}
\title{Vec operator}
\usage{
vec(mat, sep = "-")
}
\arguments{
\item{mat}{matrix}

\item{sep}{separator of column and row names; used only if \code{mat} has dimnames}
}
\value{
vector, possibly with names as <rowname><sep><colname>
}
\description{
Applies the vec operator to a matrix, i.e., concatenate its columns, and save the names, too, if any.
}
\examples{
mat <- matrix(c(1, 2, 3,
                4, 5, 6),
              nrow = 2, ncol = 3, byrow = TRUE,
              dimnames = list(as.character(1:2), letters[1:3]))
mat
vec(mat)
}
\seealso{
\code{\link{invvec}}
}
\author{
Timothee Flutre
}
