ggCor: Draw a heatmap of correlation test

Description Usage Arguments Examples

View source: R/ggCor.R

Description

Draw a heatmap of correlation test

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ggCor(
  data,
  what = 1,
  label = 0,
  colors = NULL,
  title = TRUE,
  mode = 2,
  digits = 2,
  interactive = FALSE,
  yreverse = TRUE,
  xangle = 45,
  yangle = 0,
  use.label = FALSE,
  ...
)

Arguments

data

A data.frame

what

if 1, correlation, if 2, partial correlation, if 3, semi-partial correlation

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

mode

1 or 2

digits

The number of decimal place

interactive

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

yreverse

If true, reverse y axis

xangle

x-axis text angle

yangle

y-axis text angle

use.label

Logical whether or not use label in case of labelled data

...

further arguments to be passed to cor.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(mycor)
require(ggplot2)
require(ggiraph)
require(ppcor)
ggCor(iris,digits=3,label=3)
ggCor(iris,what=3,digits=3,label=3)
ggCor(iris,label=3,interactive=TRUE)
ggCor(mtcars,interactive=TRUE)
ggCor(mtcars,mode=2,interactive=TRUE)
ggCor(iris,method="pearson",interactive=TRUE)

Example output

Loading required package: mycor
Loading required package: ggplot2
Loading required package: ggiraph
Loading required package: ppcor
Loading required package: MASS

ggiraphExtra documentation built on Oct. 23, 2020, 7:39 p.m.