ggcorrplot: Visualize a correlation matrix

View source: R/ggcorrplot.R

ggcorrplotR Documentation

Visualize a correlation matrix

Description

Visualize a correlation matrix

Usage

ggcorrplot(
  corr,
  method = c("circle", "square", "ellipse", "number"),
  type = c("full", "lower", "upper"),
  p.mat = NULL,
  col = NULL,
  sig.lvl = 0.05,
  number.digits = 2,
  show.diag = TRUE,
  insig = c("pch", "blank", "label_sig"),
  pch = 4,
  pch.cex = 5
)

Arguments

corr

a correlation matrix to be visualized

method

a character indicating the visualization method of correlation matrix to be used. Currently, it supports four methods, named "circle" (default), "square", "ellipse", "number".

type

a character indicating that the "full" (default), "upper" or "lower" triangular matrix is displayed.

p.mat

a matrix of p-value

col

a vector of the colors to be used, which are distributed uniformly from -1 to 1. If NULL, col will be set to RColorBrewer::brewer.pal(n = 11, name = "RdBu"), the default colour scheme of corrplot.

sig.lvl

a numeric vector specifying significant level(s). If the p-value in p.mat is bigger than sig.lvl (0.05 by default), then the corresponding correlation coefficient is regarded as insignificant. If insig is "label_sig", this may be an increasing vector of significance levels, for example c(0.05, 0.01, 0.001), in which case pch will be used once for the highest p-value interval and multiple times (e.g. "*", "**", "***") for each lower p-value interval.

number.digits

the number of decimal digits (2 by default) while the visualization method is "number".

show.diag

a logical indicating whether display the correlation coefficients on the principal diagonal.

insig

a character specialized insignificant correlation coefficients, "pch" (default), "blank", or "label_sig".

pch

a point character indicating the shape of insignificant correlation coefficients.

pch.cex

a number controlling the shape size of insignificant correlation coefficients.


caijun/ggcorrplot2 documentation built on May 15, 2022, 1:28 a.m.