ropensci / iheatmapr

Complex, interactive heatmaps in R
https://docs.ropensci.org/iheatmapr
Other
267 stars 35 forks source link

Plotting one column or row fails #69

Closed romert01 closed 4 years ago

romert01 commented 4 years ago

If for some reason I'd like to plot one single row or column, the fill is always just white:

a <- matrix(c(1, 2, 3, 4), nrow = 2)
b <- matrix(c(1, 2), nrow = 2)
d <- matrix(c(1, 2), nrow = 1)

iheatmap(a) ## This works fine

image

iheatmap(b) # This fails

image

iheatmap(d)  # This also fails

image

AliciaSchep commented 4 years ago

Thanks for the reproducible example. Found the root cause for this (single length vector getting "unboxed" in json conversion into a single digit instead of array) and am implementing a fix that should go into next cran release.