我有一个如下所示的数据框:
V2 V3 V4 V5 V6 V7
PPAR Signaling 1.32 1.41 0 1.61 1.36 1.210
PPARα/RXRα Activation 0.00 0.00 0 1.34 1.10 0.944
使用此代码:
dat <- structure(list(V2 = c(1.32, 0), V3 = c(1.41, 0), V4 = c(0L, 0L
), V5 = c(1.61, 1.34), V6 = c(1.36, 1.1), V7 = c(1.21, 0.944)), .Names = c("V2",
"V3", "V4", "V5", "V6", "V7"), row.names = c("PPAR Signaling",
"PPARα/RXRα Activation"), class = "data.frame")
## Actual data can be found here http://dpaste.com/2AYAPSX/
## In reality the data is read using
# dat <- read.table("http://dpaste.com/2AYAPSX/",sep="\t")
# dat(rownames) <- dat$V1
# dat$V1 <- NULL
heatmap(as.matrix(dat))
它产生这样的热图:
请注意,希腊字母更改为..
。
如何正确显示希腊字母?
更新:会话信息
> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
答案 0 :(得分:4)
尝试
heatmap(as.matrix(dat), labRow =c("PPAR Signaling",
expression(paste("PPAR",alpha,"/RXR", alpha, " Activation"))))