ggHeatmap: Make an interactive Heatmap

Description Usage Arguments Value Examples

View source: R/ggHeatmap.R

Description

Make an interactive Heatmap

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
ggHeatmap(
  data,
  mapping,
  stat = "count",
  palette = "Blues",
  reverse = FALSE,
  addlabel = FALSE,
  polar = FALSE,
  interactive = FALSE,
  yangle = 0,
  color = "grey50",
  size = 0.1,
  use.label = TRUE,
  use.labels = TRUE,
  ...
)

Arguments

data

A data.frame

mapping

Set of aesthetic mappings created by aes or aes_.

stat

The statistical transformation to use on the data for this layer, as a string c("count","identity")

palette

A palette name used for discrete fill var, Default value is "Blues"

reverse

If true, reverse palette colors

addlabel

A logical value. If TRUE, label will be added to the plot

polar

A logical value. If TRUE, coord_polar() function will be added

interactive

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

yangle

A integer. The value will be used adjust the angle of axis.text.y

color

Color argument passed on to geom_rect_interactive.

size

Size argument passed on to geom_rect_interactive.

use.label

Logical. Whether or not use column label in case of labelled data

use.labels

Logical. Whether or not use value labels in case of labelled data

...

other arguments passed on to geom_rect_interactive.

Value

An interactive barplot

Examples

1
2
3
4
5
6
7
8
9
require(moonBook)
require(ggplot2)
require(ggiraph)
require(sjmisc)
ggHeatmap(acs,aes(x=Dx,y=smoking),addlabel=TRUE,interactive=TRUE)
ggHeatmap(acs,aes(x=sex,y=Dx,fill=age),addlabel=TRUE,interactive=TRUE)
ggHeatmap(rose,aes(x=Month,y=group,fill=value),stat="identity",addlabel=TRUE)
ggHeatmap(rose,aes(x=Month,y=group,fill=value),addlabel=TRUE)
ggHeatmap(taco,aes(x=AgeGroup,y=Filling,fill=Rating,facet=ShellType),color="grey50",stat="identity")

Example output

Loading required package: moonBook
Loading required package: ggplot2
Loading required package: ggiraph
Loading required package: sjmisc
sh: 1: wc: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Could not detect number of cores, defaulting to 1.

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