corRows | R Documentation |
corRows
is a simple function to perform a pairwise correlation between
rows of a numeric matrix by calling stats::cor()
on the transposed
input matrix x
.
corRows(
x,
y = NULL,
use = "pairwise.complete.obs",
method = c("pearson", "kendall", "spearman"),
...
)
x |
|
y |
not supported (ignored). |
use |
see information for parameter |
method |
see information for parameter |
... |
additional parameters (ignored). |
matrix
with correlation coefficients between rows in x
.
Johannes Rainer
## Define a simple numeric matrix
x <- rbind(
c(12, 34, 231, 234, 9, 5, 7),
c(900, 900, 800, 10, 12, 9, 4),
c(25, 70, 400, 409, 15, 8, 4),
c(12, 13, 14, 15, 16, 17, 18),
c(14, 36, 240, 239, 12, 7, 8)
)
corRows(x)
corRows(x, method = "spearman")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.