[R] To obtain a graph by geom_bar or other

Michel ARNAUD michel.arnaud34 at gmail.com
Wed Mar 5 15:06:06 CET 2014


Hi

I have the dataframe following :
data.frame(Annee =c(rep("2004",200), rep("2005",200)),
CiradMed =  c(rep("Cirad",100), rep("Med", 100),
rep("Cirad",100), rep("Med", 100)) ,
Type=c(rep("T1", 25), rep("T2", 20), rep("T3", 30), rep("T4", 25),
rep("T1", 20), rep("T2", 30), rep("T3", 40), rep("T4", 10),
rep("T1", 25), rep("T2", 30), rep("T3", 35), rep("T4", 10),
rep("T1", 15), rep("T2", 35), rep("T3", 40), rep("T4", 10)) ,
stringsAsFactors=FALSE)

Is it possible to build with ggplot the same graph obtained by graphics 
packages (see the joined file) ?
I tried by using geom_bar(position="dodge") but it is not correct.

Thank you for your help
Michel




More information about the R-help mailing list