ggHeatmap: Make an interactive Heatmap

Description Usage Arguments Value Examples

Description

Make an interactive Heatmap

Usage

1
2
3
4
ggHeatmap(data, xvar, yvar, fillvar = NULL, facetvar = NULL,
  stat = "count", gradient_colors = c("white", "steelblue"),
  addlabel = FALSE, polar = FALSE, interactive = FALSE, yangle = 0,
  color = "black", size = 0.1, ...)

Arguments

data

A data.frame

xvar

A character string of column name be assigned to the x-axis variable

yvar

A character string of column name be assigned to the y-axis variable. Uses only when stat="identity".

fillvar

A character string of column name be assigned to the fill variable

stat

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

gradient_colors

A voector of color names used in function scale_fill_gradientn(). Default value is c("white","steelblue")

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_bar_interactive.

size

Size argument passed on to geom_bar_interactive.

...

other arguments passed on to geom_bar_interactive.

facet

A character string of column name be assigned to the facet_wrap variable

Value

An interactive barplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(moonBook)
require(ggplot2)
require(ggiraph)
ggHeatmap(acs,"Dx","smoking",addlabel=TRUE)
ggHeatmap(rose,"group","Month","value",stat="identity",gradient_colors = c("white","red"))
ggHeatmap(rose,"group","Month","value",stat="identity",addlabel=TRUE)
ggHeatmap(rose,"Month","group","value",stat="identity",polar=TRUE,interactive=TRUE)
ggHeatmap(taco,"AgeGroup","Filling","Rating",stat="identity")
ggHeatmap(taco,"AgeGroup","Filling","Rating","ShellType",stat="identity")
ggHeatmap(taco,"AgeGroup","Filling","Rating","ShellType",stat="identity",interactive=TRUE)

cardiomoon/moonBook2 documentation built on May 13, 2019, 12:40 p.m.