Skip to content

An r package for generating beautiful and customizable heatmaps (added some options - mychan24)

Notifications You must be signed in to change notification settings

mychan24/superheat

 
 

Repository files navigation

output
html_document

superheat: An R package for supervised heatmaps

Testing some additional features

7/20/2018 - mychan24

  • Added if-statement to only sort label color when label is for "variable".
    • Issue: label color (left.label.col, bottom.label.col) was getting sorted by the row-order when it is meant for the membership/cluster.

7/18/2018 - mychan24

  • Added x.axis.reverse and y.axis.reverse to flip the heat-map and label's orientation. Have not tested with yr/yt options yet.
    • Issue: Wanted to display matrix with origin (0,0) on the top left corner, with ascending integer going downward on the y-axis.
  • Added an option (smooth.heat.type) to allow using mean or median to smooth the cells when using smooth.heat.
    • Issue: Wanted to smooth clusters with mean instead of median.
Normal Display of Matrix by membership Reversed Y-axis
mat remat

Travis-CI Build Status

Superheat is an R package for generating beautiful and customizable heatmaps. See the vignette for usage.

If you find any bugs, have any feature requests or feedback, please submit an issue.

To download and install the development version of the package, use devtools:

install.packages("devtools")
devtools::install_github("mychan24/superheat")

Once you've installed the package, you can load the library in the standard way:

library(superheat)

Basic usage:

superheat(mtcars,
          # normalize variables
          scale = T,
          # order rows/cols based on heirarchical clustering
          pretty.order.rows = TRUE,
          pretty.order.cols = TRUE,
          # plot miles per gallon next to the rows
          yr = mtcars$mpg,
          yr.axis.name = "miles per gallon",
          # plot correlation with mpg above columns
          yt = cor(mtcars)[, "mpg"],
          yt.plot.type = "bar",
          yt.axis.name = "correlation with mpg",
          # increase size of left labels
          left.label.size = 0.45)

image1

About

An r package for generating beautiful and customizable heatmaps (added some options - mychan24)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • R 99.8%
  • Rebol 0.2%