ropensci/iheatmapr

Plotting one column or row fails

romert01 opened this issue · 1 comments

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

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.