Chapter 13 Smoothing in high dimensions
In situations where you are plotting a very large matrix, often the heatmap becomes obscured by noise due to the sheer amount of information being presented relative to the number of pixels available.
To address this common issue, we have allowed for smoothing by summarizing values within a cluster by the median value. This can be achieved using the
gears <- paste(mtcars$gear, "gears") set.seed(2016113) superheat(mtcars, # scale the matrix columns scale = TRUE, # cluster by gears membership.rows = gears, # place each variable in its own cluster membership.cols = 1:ncol(mtcars), bottom.label = "variable", # smooth the heatmap within clusters smooth.heat = TRUE)
## Warning: Column `rclust` joining factors with different levels, coercing to ## character vector
## Warning: Column `cclust` joining factors with different levels, coercing to ## character vector