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

plotCorrMatrix

plotCorrMatrix


Description

Plot correlation matrix

Usage

plotCorrMatrix(
  C,
  dendrogram = "both",
  sort = TRUE,
  margins = c(13, 13),
  key.xlab = "correlation",
  ...
)

Arguments

C

correlation matrix: R or R^2 matrix

dendrogram

character string indicating whether to draw 'both' or none'

sort

sort rows and columns based on clustering

margins

spacing of plot

key.xlab

label of color gradient

...

additional arguments to heatmap.2

Details

Plots image of correlation matrix using customized call to heatmap.2

Value

Image of correlation matrix

Examples

# simulate simple matrix of 10 variables
mat = matrix(rnorm(1000), ncol=10)

# compute correlation matrix
C = cor(mat)

# plot correlations
plotCorrMatrix( C )

# plot squared correlations
plotCorrMatrix( C^2, dendrogram="none" )

variancePartition

Quantify and interpret divers of variation in multilevel gene expression experiments

v1.20.0
GPL (>= 2)
Authors
Gabriel E. Hoffman
Initial release
2020-10-26

We don't support your browser anymore

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