Description Usage Arguments Details Value Author(s) See Also Examples
Matrix of Correlations, P-values and confidence intervals
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
x, y |
a matrix object or NULL. |
method |
a character string indicating which correlation coefficient is to be used for the test. One of "pearson", "kendall", or "spearman". |
use |
an optional character string giving a method for computing covariances in the presence of missing values. |
adjust |
logical, if TRUE (default) will adjust p value for multiple comparisons. |
adjust_method |
correction method. |
... |
extra params, see Details. |
The columns of 'x' will be tested for each pair when y is NULL(the default), otherwise each column in 'x' and each column in 'y' is tested for each pair.
a list with correlation matrix, P values matrix, confidence intervals matrix.
Hou Yun
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | correlate(mtcars)
m1 <- matrix(rnorm(100), nrow = 10)
m2 <- matrix(rnorm(60), nrow = 10)
correlate(m1, m2)
## adjust p value
correlate(m1, m2, cor.test = TRUE, adjust = TRUE)
## fast compute correlation
## Not run:
require(WGCNA)
fast_correlate(m1, m2)
require(picante)
fast_correlate2(m1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.