Chapter 5 Missing data
Superheat deals with missing values gracefully by filling them in with a color of your choice (the default is grey).
library(superheat)
# replace some values with missing values
mtcars.missing <- mtcars
mtcars.missing[sample(1:nrow(mtcars), 5),
sample(1:ncol(mtcars), 5)] <- NA
superheat(mtcars.missing,
# scale the matrix
scale = T)
5.1 Color
You can set the color of missing values by setting heat.na.col
to a color of your choice.