Mac's Code
# 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
oys.exp <- read.csv("http://eagle.fish.washington.edu/cnidarian/alloysterexp_test.csv",
header = TRUE, row.names = 1)
# logtransform
oyslog <- data.trans(oys.exp, method = "log", plot = F)
## Error: could not find function "data.trans"
# transpose
oyslogt <- t(oyslog)
## Error: object 'oyslog' not found
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