服务热线
178 0020 3020
library(reshape2)
library(plyr)
library(scales)
library(ggplot2)
library(pheatmap)
mydata=read.csv("/Users/liutianzi/Downloads/2.csv",head=T)
mydata1=melt(mydata,id.vars="ID",value.name = "Expression",variable.name="group")
mydata2=ddply(mydata1,"group",transform,Expression=rescale(Expression))
mydata3=matrix(mydata2[,3],nrow=16,ncol=4)
row.names(mydata3)=mydata[,1]
colnames(mydata3)=colnames(mydata)[-1]
pheatmap(mydata3,color = colorRampPalette(c("blue","white","red"))(50),main ="R2-21")
附件