服务热线
178 0020 3020
> library(ggplot2)
> library(scales)
> library(plyr)
> library(reshape2)
> get.wd()
Error in get.wd() : 没有"get.wd"这个函数
> getwd()
[1] "C:/Users/Administrator/Desktop/R语言"
> a<-read.csv("2.csv")
> b<-melt(a,id.vars=c("ID"))
> c<-ddply(b,.(variable), transform,label=rescale(value))
> ggplot(c, aes(x=variable,y=ID))+geom_tile(aes(fill=label))+scale_fill_gradient(low = "green", high = "yellow")+xlab("Groups") +geom_text(aes(label=round(label,2)),size=4)+ggtitle("R2-07")
>
附件