Learn R Programming

⚠️There's a newer version (0.95) of this package.Take me there.

Summary

R package corrplot provides a visual exploratory tool on correlation matrix that supports automatic variable reordering to help detect hidden patterns among variables.

corrplot is very easy to use and provides a rich array of plotting options in visualization method, graphic layout, color, legend, text labels, etc. It also provides p-values and confidence intervals to help users determine the statistical significance of the correlations.

For examples, see its online vignette.

This package is licensed under the MIT license, and available on CRAN: https://cran.r-project.org/package=corrplot.

Basic example

library(corrplot)
M = cor(mtcars)
corrplot(M, order = 'hclust', addrect = 2)

Download and Install

To download the release version of the package on CRAN, type the following at the R command line:

install.packages('corrplot')

To download the development version of the package, type the following at the R command line:

devtools::install_github('taiyun/corrplot', build_vignettes = TRUE)

How to cite

To cite corrplot properly, call the R built-in command citation('corrplot') as follows:

citation('corrplot')

Reporting bugs and other issues

If you encounter a clear bug, please file a minimal reproducible example on github.

Copy Link

Version

Install

install.packages('corrplot')

Monthly Downloads

312,514

Version

0.92

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

November 18th, 2021

Functions in corrplot (0.92)

corrplot.mixed

Using mixed methods to visualize a correlation matrix.
colorlegend

Draw color legend.
corrplot

A visualization of a correlation matrix.
COL2

Get diverging colors
corrMatOrder

Reorder a correlation matrix.
COL1

Get sequential colors
corrplot-package

Visualization of a correlation matrix
corrRect

Draw rectangle(s) on the correlation matrix graph.
corrRect.hclust

Draw rectangles on the correlation matrix graph.
cor.mtest

Significance test which produces p-values and confidence intervals for each pair of input features.