Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

corrplot.mixed

Using mixed methods to visualize a correlation matrix.


Description

Using mixed methods to visualize a correlation matrix.

Usage

corrplot.mixed(
  corr,
  lower = "number",
  upper = "circle",
  tl.pos = c("d", "lt", "n"),
  diag = c("n", "l", "u"),
  bg = "white",
  addgrid.col = "grey",
  lower.col = NULL,
  upper.col = NULL,
  plotCI = c("n", "square", "circle", "rect"),
  mar = c(0, 0, 0, 0),
  ...
)

Arguments

corr

Matrix, the correlation matrix to visualize.

lower

Character, the visualization method for the lower triangular correlation matrix.

upper

Character, the visualization method for the upper triangular correlation matrix.

tl.pos

Character, "lt", "d" or "n", giving position of text labels, "lt" means left and top, "d" means diagonal. If "n", add no textlabel.

diag

Character, for specifying the glyph on the principal diagonal. It is one of "n" (default, draw nothing), "l" (draw the glyphs of lower triangular) or "u" (draw the glyphs of upper triangular).

bg

The background color.

addgrid.col

See the addgrid.col parameter in the function corrplot

lower.col

Passed as col parameter to the lower matrix.

upper.col

Passed as col parameter to the upper matrix.

plotCI

See the plotCI parameter in the function corrplot

mar

See par.

...

Additional arguments for corrplot's wrappers

Author(s)

Taiyun Wei

Examples

M <- cor(mtcars)
ord <- corrMatOrder(M, order = "AOE")
M2 <- M[ord,ord]


corrplot.mixed(M2)
corrplot.mixed(M2, lower = "ellipse", upper = "circle")
corrplot.mixed(M2, lower = "square", upper = "circle")
corrplot.mixed(M2, lower = "shade", upper = "circle")
corrplot.mixed(M2, tl.pos = "lt")
corrplot.mixed(M2, tl.pos = "lt", diag = "u")
corrplot.mixed(M2, tl.pos = "lt", diag = "l")
corrplot.mixed(M2, tl.pos = "n")

corrplot

Visualization of a Correlation Matrix

v0.88
MIT + file LICENSE
Authors
Taiyun Wei [cre, aut], Viliam Simko [aut], Michael Levy [ctb], Yihui Xie [ctb], Yan Jin [ctb], Jeff Zemla [ctb], Moritz Freidank [ctb], Jun Cai [ctb], Tomas Protivinsky [ctb]
Initial release
2021-05-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.