cov
function. It can
only compute a covariance matrix from a data matrix without any missing value
handling by the procedure (in R notation)
S0 <- sweep(x, 2, colMeans(x))
,
crossprod(S0)/(nrow(S0) - 1) # (covariance matrix result)
Covariance matrix
This function is more limited than R's default cov
function. It can
only compute a covariance matrix from a data matrix without any missing value
handling by the procedure (in R notation)
S0 <- sweep(x, 2, colMeans(x))
,
crossprod(S0)/(nrow(S0) - 1) # (covariance matrix result)
# S4 method for scidb
cov(x, y = NULL, use = "everything", method = c("pearson", "kendall", "spearman"))
a 2-d scidb array with a single numeric attribute
UNUSED, limited to correlation matrix in the SciDB case
UNUSED, limited to "everything" in the SciDB case
UNUSED, limited to "pearson" in the SciDB case
covariance matrix of x
(as a SciDB array)