\Header{cor}{Correlation and Covariance Matrices}
\alias{cov}{cor}
\keyword{multivariate}{cor}
\keyword{array}{cor}
\begin{Usage}
\begin{verbatim}
cor(x, y=x, use="all.obs")
cov(x, y=x, use="all.obs")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{x}] a matrix or data frame.
\item[\texttt{y}] a matrix or data frame.
\item[\texttt{use}] a character string giving the method for handling
missing observations. This must be one of the stringss
\texttt{"all.obs"}, \texttt{"complete.obs"} or \texttt{"pairwise.complete.obs"}
(abbreviations are acceptable).
\end{ldescription}
\end{Arguments}
\begin{Value}
The correlation matrix or covariance matrix
of the columns of \texttt{x} and the columns of \texttt{y}.

If \texttt{use} has the value \texttt{"all.obs"}, then the presence
of missing observations will cause the computation to fail.
If \texttt{use} has the value \texttt{"complete.obs"} then missing values
are handled by casewise deletion.  Finally, if \texttt{use} has the
value \texttt{"pairwise.complete.obs"} then the correlation between
each pair of variables is computed using all complete pairs
of observations on those variables.
This can result in correlation matrices which are not
positive semidefinite.\end{Value}

