Description Usage Arguments Value Author(s) See Also Examples
The fortify_cor function is a deep encapsulation of
the as_cor_tbl
function and also supports converting raw
data into cor_tbl objects by calculation.
1 2 3 4 5 6 7 8 9 10 11 12 |
x |
any |
y |
NULL (default) or a matrix or data frame with compatible dimensions to x. |
is.cor |
logical value (default to FALSE) indicating wheater
|
group |
NULL (default) or a vector that has the same number of rows as x. |
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. |
cor.test |
logical value (default to TRUE) indicating whether test for the correlation. |
cluster |
logical value (default to FALSE) indicating whether reorder the correlation matrix by cluster. |
cluster.method |
the agglomeration method to be used. This should be (an unambiguous abbreviation of) one of "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). |
... |
extra params passing to |
cor_tbl object.
Houyun Huang, Lei Zhou, Jian Chen, Taiyun Wei
matrix_order
, hclust
,
as_cor_tbl
.
1 2 3 4 5 | fortify_cor(mtcars)
fortify_cor(iris[-5], group = iris[[5]])
fortify_cor(mtcars, type = "lower", cluster = TRUE)
m <- cor(mtcars)
fortify_cor(m, is.cor = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.