While trying to create a Heatmap in R as mentioned in http://davetang.org/muse/2010/12/06/making-a-heatmap-with-r/
data <- read.table("test.txt",sep="\t",header=TRUE,row.names=1)
data_matrix <- data.matrix(data)
install.packages("RColorBrewer")
library("RColorBrewer")
heatmap(data_matrix,Colv=NA,col=brewer.pal(9,"Blues"))
How do I get the scale of colours beside the heatmap that shows range of values corresponding to shades of colours used, (small value corresponding to light shade and high value to a dark shade) similar to the first heatmap in Creating a continuous heat map in R