plotCorrTriangle: Plot triangle of correlation matrix

View source: R/plots.R

plotCorrTriangleR Documentation

Plot triangle of correlation matrix

Description

Plot lower triangle of correlation matrix

Usage

plotCorrTriangle(
  C,
  size = 1,
  stroke = 1.5,
  cols = c("blue", "white", "red"),
  absCorr = FALSE
)

Arguments

C

correlation matrix

size

plotting argument to geom_point()

stroke

plotting argument to geom_point()

cols

array of two colors for gradient

absCorr

show absolute correlations

Details

Adjust size and stroke of points in the plot to fix look of plot depending on dimensions

Value

ggplot2 plot of correlation matrix

Examples

N = 1000
p = 100
X = matrix(rnorm(N*p), N,p)
C = cor(X)
plotCorrTriangle( C )


GabrielHoffman/decorate documentation built on May 23, 2023, 1:29 a.m.