| covariance {pbdDMAT} | R Documentation |
cov()
and var() form the variance-covariance matrix. cor() forms
the correlation matrix. cov2cor() scales a covariance matrix into a
correlation matrix.
## S4 method for signature 'ddmatrix' cov(x, y = NULL, use = "everything", method = "pearson") ## S4 method for signature 'ddmatrix' var(x, y = NULL, na.rm = FALSE, use) ## S4 method for signature 'ddmatrix' cor(x, y = NULL, use = "everything", method = "pearson") ## S4 method for signature 'ddmatrix' cov2cor(V)
x, y, V |
numeric distributed matrices. |
use |
character indicating how missing values should be treated.
Acceptable values are the same as |
method |
character argument indicating which method should be used to
calculate covariances. Currently only "spearman" is available for
|
na.rm |
logical, determines whether or not |
cov() forms the variance-covariance matrix. Only
method="pearson" is implemented at this time.
var() is a shallow wrapper for cov() in the case of a
distributed matrix.
cov2cor() scales a covariance matrix into a correlation matrix.
Returns a distributed matrix.
## Not run:
# Save code in a file "demo.r" and run with 2 processors by
# > mpiexec -np 2 Rscript demo.r
library(pbdDMAT, quiet = TRUE)
init.grid()
x <- ddmatrix("rnorm", nrow=3, ncol=3), bldim=2
cv <- cov(x)
print(cv)
finalize()
## End(Not run)