Description Usage Arguments Value Examples
View source: R/mod_cs_cor_corrplot.R
Customized corrplot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | corrplot_mixed(
cor_matrix,
cor_test = NULL,
lower = "number",
upper = "circle",
lower.col = NULL,
upper.col = NULL,
order = c("original", "AOE", "FPC", "hclust", "alphabet"),
hclust.method = c("complete", "ward", "ward.D", "ward.D2", "single", "average",
"mcquitty", "median", "centroid"),
addrect = NULL,
plotCI = c("n", "square", "circle", "rect"),
bg = "white",
mar = c(0, 0, 0, 0),
...
)
|
cor_matrix |
Matrix, the correlation matrix to visualize. |
cor_test |
A list of matrix return by
|
lower |
A Character, the visualization method for the lower triangular correlation matrix. |
upper |
A Character, the visualization method for the upper triangular correlation matrix. |
lower.col |
Passed as col parameter to the lower matrix. |
upper.col |
Passed as col parameter to the upper matrix. |
order |
Character, the ordering method of the correlation matrix.
"original" for original order (default).
* "AOE" for the angular order of the eigenvectors.
* "FPC" for the first principal component order.
* "hclust" for the hierarchical clustering order.
* "alphabet" for alphabetical order.
See order parameter in |
hclust.method |
A Character, the agglomeration method to be used when
order is |
addrect |
A Integer, the number of rectangles draws on the graph
according to the hierarchical cluster, only valid when order is |
plotCI |
See the plotCI parameter in |
bg |
The background color. |
mar |
See |
... |
Additional arguments for |
(Invisibly) returns a reordered correlation matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# Prepare cor matrix
cor_matrix <- cor(mtcars)
cor_test <- corrplot::cor.mtest(cor_matrix)
# Plot a customized corplot wich cluster segments
corrplot_mixed(cor_matrix,
cor_test = cor_test,
order = "hclust", addrect = 3
)
# Plot a customized corplot wich cluster segments and CI.
corrplot_mixed(cor_matrix,
cor_test = cor_test,
order = "hclust", addrect = 3,
plotCI = "rect"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.