服务热线
178 0020 3020
library(reshape2)
library(scales)
library(plyr)
library(ggplot2)
mydata=read.csv(file.choose())
mydata1=melt(mydata,id.vars = c("ID"))
mydata2=ddply(mydata1,.(variable),transform,label=rescale(value))
picture=ggplot(mydata2,aes(x=variable,y=ID))+geom_tile(aes(fill=label))+scale_fill_gradient(low="yellow",high="red")+xlab("Groups")+ylab("ID")+labs(title="R2-18")
picture
附件