The R Project SVN R

Rev

Rev 7780 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

\name{crossprod}
\alias{crossprod}
\title{Matrix Crossproduct}
\description{
  Given matrices \code{x} and \code{y} as arguments,
  \code{crossprod} returns their matrix cross-product.
  This is formally equivalent to, but faster than, the
  call \code{t(x) \%*\% y}.
}
\usage{
crossprod(x, y=x)
}
\seealso{
\code{\link{\%*\%}} and outer product \code{\link{\%o\%}}.
}
\examples{
crossprod(1:4)    # = sum(1 + 2^2 + 3^2 + 4^2)
drop(.Last.value) # scalarized
}
\keyword{algebra}
\keyword{array}