Tutorial by Examples

stats::heatmap Example 1 (Basic usage) require(graphics); require(grDevices) x <- as.matrix(mtcars) rc <- rainbow(nrow(x), start = 0, end = .3) cc <- rainbow(ncol(x), start = 0, end = .3) hv <- heatmap(x, col = cm.colors(256), scale = "column", RowSideColo...
Given: x <- as.matrix(mtcars) One can use heatmap.2 - a more recent optimized version of heatmap, by loading the following library: require(gplots) heatmap.2(x) To add a title, x- or y-label to your heatmap, you need to set the main, xlab and ylab: heatmap.2(x, main = "My main t...

Page 1 of 1