Description Usage Arguments Details Value Author(s) Examples
Functions to create cor_tbl object from correlation matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
corr |
correlation matrix. |
p.value |
significance value matrix of correaltion. |
extra.mat |
any other matrix-like data with same dimmsion as |
type |
a string, "full" (default), "upper" or "lower", display full, lower triangular or upper triangular matrix. |
show.diag |
a logical value indicating whether keep the diagonal. |
row.names, col.names |
row/column names of correlation matrix. |
row.order, col.order |
row/column order of correlation matrix. |
cluster |
one of "all", "row", "col" or "none". If is logical value, TRUE value means "all", and FALSE means "none". |
... |
extra params passing to |
Create a cor_tbl object
a cor_tbl object.
Houyun Huang, Lei Zhou, Jian Chen, Taiyun Wei
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | cor_tbl(cor(mtcars))
corr <- correlate(mtcars, cor.test = TRUE)
## with p value
cor_tbl(corr$r, corr$p.value)
## reorder correlation matrix
cor_tbl(corr$r, corr$p.value, cluster = TRUE)
## exclude upper or lower
### exclude lower
cor_tbl(corr$r, corr$p.value, type = "upper")
### exclude upper
cor_tbl(corr$r, corr$p.value, type = "lower", show.diag = FALSE)
## add extra matrix data
m <- matrix(rnorm(11*11), nrow = 11)
cor_tbl(corr$r, corr$p.value, extra.mat = list(m = m))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.