R Codes: Understanding the arguments of heatmap.2 {gplots}
R heatmap Shaojun Xie Thursday, November 19, 2015 This is an example to show you how to draw a heatmap and also show you how each parameter work. library ( gsheet ) a <- gsheet2tbl ( 'https://docs.google.com/spreadsheets/d/1MUPsoYsxHwoQFEjsq_XlTvxAK6uA0QyuboACvMg2pVo/pubhtml' ) b <- unlist ( a [ , 1 ] ) rownames ( a ) <- b a $ id <- NULL library ( gplots ) heatmap.2 ( as.matrix ( a ) ) Arguments “scale” is the chrater string indicating whether to draw ‘none’, ‘row’, ‘column’ or ‘both’ dendrograms. Defaults to ‘both’. However, if Rowv (or Colv) is FALSE or NULL and dendrogram is ‘both’, then a warning is issued and Rowv (or Colv) arguments are honoured. heatmap.2 ( as.matrix ( a ) , scale = "row" ) Argument “col” is colors used for the image. Defaults to heat colors (heat.colors). heatmap.2 ( as.matrix ( a ) , scale = "row" , col = bluered ( 256 ) ) Argument “trace”: character string indicating whether a solid “trace”...