var {math} |
R Documentation |
Correlation, Variance and Covariance (Matrices)
Description
var, cov and cor compute the variance of x and the covariance or
correlation of x and y if these are vectors. If x and y are
matrices then the covariances (or correlations) between the columns
of x and the columns of y are computed.
Usage
var(x,
y = NULL,
na.rm = FALSE,
use = everything);
Arguments
x
a numeric vector, matrix or data frame.
y
NULL (default) or a vector, matrix or data frame with compatible dimensions to x.
The default is equivalent to y = x (but more efficient).
na.rm
logical. Should missing values be removed?. [as boolean]
use
an optional character string giving a method for computing covariances
in the presence of missing values. This must be (an abbreviation of)
one of the strings "everything", "all.obs", "complete.obs", "na.or.complete",
or "pairwise.complete.obs". [as varUseMethods]
Details
Authors
SMRUCC genomics Institute
Value
this function returns data object of type
any kind.
clr value class
Examples
[Package
math version 2.33.856.6961
Index]