Playing with Heatmaps ======================================================== Mac's Code ```r # install.packages('gplots') install.packages('RColorBrewer') library(RColorBrewer) library(gplots) ``` ``` ## KernSmooth 2.23 loaded ## Copyright M. P. Wand 1997-2009 ## ## Attaching package: 'gplots' ## ## The following object is masked from 'package:stats': ## ## lowess ``` ```r oys.exp <- read.csv("http://eagle.fish.washington.edu/cnidarian/alloysterexp_test.csv", header = TRUE, row.names = 1) ``` ```r # logtransform oyslog <- data.trans(oys.exp, method = "log", plot = F) ``` ``` ## Error: could not find function "data.trans" ``` ```r # transpose oyslogt <- t(oyslog) ``` ``` ## Error: object 'oyslog' not found ``` ```r mat=data.matrix(oys.exp) pdf("test.pdf", height=10, width=10) heatmap.2(mat, Rowv=TRUE, Colv=TRUE, # dendrogram= c("none"), distfun = dist, hclustfun = hclust, xlab = "X data", ylab = "Y data", key=TRUE, keysize=1, trace="none", density.info=c("none"), margins=c(10, 8), col=brewer.pal(10,"PiYG") # col=redgreen(75), ) dev.off() ``` ``` ## pdf ## 2 ``` test_pdf__1_page__191D2160.png