rlbarter / superheat

An r package for generating beautiful and customizable heatmaps
https://rlbarter.github.io/superheat/
238 stars 29 forks source link

legend.breaks ? #35

Closed EastBayEv closed 6 years ago

EastBayEv commented 6 years ago

Hi - I am trying to run the first example here: https://rlbarter.github.io/superheat/legend.html#legend-breaks

The code looks like this:

superheat(mtcars,
          # scale the matrix columns
          scale = TRUE,

          # specify the legend breaks
          legend.breaks = c(-0.5, 0.5, 1.5))

However, this produces the error message:

Error in superheat(mtcars, scale = TRUE, legend.breaks = c(-0.5, 0.5,  : 
  unused argument (legend.breaks = c(-0.5, 0.5, 1.5))

I could simply be missing something, but I thought I would ask because legend.breaks does not appear in the ?superheat help list of arguments.

Thanks!

rlbarter commented 6 years ago

Hi Evan, I suspect the issue is that you're using the CRAN version of the package, but a lot of the documentation is for the dev version on github. (The CRAN version will be updated soon).

Try installing from github

install.packages("devtools")
devtools::install_github("rlbarter/superheat")
library(superheat)

and let me know if this fixes the problem.