correlation | R Documentation |
Correlation
correlation(x, y, ...)
## S4 method for signature 'Matrix,Matrix'
correlation(x, y, method = c("pearson", "kendall", "spearman"))
## S4 method for signature 'Matrix,missingOrNULL'
correlation(x, y = NULL, method = c("pearson", "kendall", "spearman"))
## S4 method for signature 'SummarizedExperiment,SummarizedExperiment'
correlation(x, y, i = 1L, method = c("pearson", "kendall", "spearman"))
## S4 method for signature 'SummarizedExperiment,missingOrNULL'
correlation(
x,
y = NULL,
i = 1L,
j = NULL,
method = c("pearson", "kendall", "spearman")
)
## S4 method for signature 'matrix,matrix'
correlation(x, y, method = c("pearson", "kendall", "spearman"))
## S4 method for signature 'matrix,missingOrNULL'
correlation(x, y = NULL, method = c("pearson", "kendall", "spearman"))
## S4 method for signature 'numeric,numeric'
correlation(x, y, method = c("pearson", "kendall", "spearman"))
x |
Object. |
y |
Object. |
method |
|
i |
|
j |
|
... |
Additional arguments. |
numeric(1)
or matrix
.
Updated 2021-06-04.
stats::cor()
.
stats::cor.test()
.
stats::sd()
.
https://stats.stackexchange.com/questions/24980
data(correlation, package = "AcidTest")
list <- correlation
## vector ====
x <- list[["vector_x"]]
y <- list[["vector_y"]]
head(x)
head(y)
correlation(x = x, y = y)
## matrix ====
x <- list[["matrix_x"]]
y <- list[["matrix_y"]]
head(x)
head(y)
stats::cor(x)
correlation(x)
stats::cor(x = c(x), y = c(y))
correlation(x = x, y = y)
## SummarizedExperiment ====
x <- list[["SummarizedExperiment_x"]]
y <- list[["SummarizedExperiment_y"]]
correlation(x = x, i = 1L)
correlation(x = x, i = 1L, j = 2L)
correlation(x = x, y = y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.