corr_matrix | R Documentation |
Using the results obtained from the corrp function, this function creates a correlation matrix.
corr_matrix(c, ...)
## Default S3 method:
corr_matrix(c, col = c("infer.value", "stat.value", "isig"), isig = TRUE, ...)
## S3 method for class 'clist'
corr_matrix(c, col = c("infer.value", "stat.value", "isig"), isig = TRUE, ...)
c |
[ |
... |
Not used. Included for S3 method consistency. |
col |
[ |
isig |
[ |
[cmatrix
]
A square matrix with class "cmatrix" where each cell [i,j] contains the correlation value between variables i and j.
The correlation values are taken from the specified column (infer.value, stat.value, or isig) of the input clist.
When isig=TRUE
, only statistically significant correlations are included, others are set to NA.
Igor D.S. Siciliani, Paulo H. dos Santos
iris_cor <- corrp(iris)
iris_m <- corr_matrix(iris_cor, isig = FALSE)
if (require("corrplot")) {
corrplot(iris_m) # You can visualize the matrix using corrplot
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.