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