First, reshape your data from wide to long format.
library(reshape2)
df.long<-melt(df,id.vars=c("ID","Type","Annee"))
Next, as during importing data letter X is added to variable names starting with number, remove it with substring()
.
df.long$variable<-substring(df.long$variable,2)
Now use variable
as x, value
as y, Annee
for fill and geom_bar()
to get barplot. With facet_wrap()
you can split data by Type
.
ggplot(df.long,aes(variable,value,fill=as.factor(Annee)))+
geom_bar(position="dodge",stat="identity")+
facet_wrap(~Type,nrow=3)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…