Learn R Programming

ggiraphExtra (version 0.1.0)

ggCor: Draw a heatmap of correlation test

Description

Draw a heatmap of correlation test

Usage

ggCor(data, label = 0, colors = NULL, title = FALSE,
  interactive = FALSE, ...)

Arguments

data

A data.frame

label

if 0, no label(default), if 1, use r value as label, if 2, use r value with significant mark as label

colors

colors for low, mid and high correlation values

title

if true, add title to the heatmap

interactive

A logical value. If TRUE, an interactive plot will be returned

...

further arguments to be passed to cor.test

Examples

Run this code
# NOT RUN {
require(mycor)
require(ggplot2)
require(ggiraph)
ggCor(iris)
ggCor(iris,label=2,interactive=TRUE)
ggCor(mtcars,interactive=TRUE)
ggCor(iris,method="pearson",interactive=TRUE)
# }

Run the code above in your browser using DataLab