You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding a covariate with all NA:s causes an error Error in discrete_colors: x >= 1 is not TRUE when plotting.
The error can either be reproduced by adding an annotation with all NA_character_, or by trying a factor with all NA and no levels (this latter case perhaps being a bit weird, but happened to me from working around #75 ).
A workaround is to make the all-NA variable a factor with a dummy level (see example below). Happily, no legend is printed when I do this.
Seems like the handling of NAs for these functions needs to be examined and maybe adjusted. What is the behavior you would expect for giving all NA values?
I'd expect the annotation to appear in the plot with all white (NA) colors and the annotation label printed. As for legends/colorbars, I don't have a preference between how the dummy example works (no colors, therefore no legend) or to have a title only legend (for consistency). To save space and since I can argue for it too making sense I'd probably cast a 60:40 vote for the "don't show a legend".
Adding a covariate with all NA:s causes an error
Error in discrete_colors: x >= 1 is not TRUE
when plotting.The error can either be reproduced by adding an annotation with all
NA_character_
, or by trying a factor with all NA and no levels (this latter case perhaps being a bit weird, but happened to me from working around #75 ).A workaround is to make the all-NA variable a factor with a dummy level (see example below). Happily, no legend is printed when I do this.
Reproducible example, tested in v 0.4.12.
The text was updated successfully, but these errors were encountered: