Hello everybody,
I hope all fine,
I want anyone to help me.
- I want to have a grouped barplot of "name" vs Oui and Non. Basically, x axis should be "Name" and Y axis should be "P" and in the barplot, I need to have Oui and Non grouped next to each other per "Name".
I was trying this code:
oui<-c(5/11,2/6,6/10,4/5,7/13,12/15,11/12,3/3,4/4,1/1,2/2,3/3,12/12,10/10)
non<-c(6/11,4/6,4/10,1/5,6/13,3/15,1/12,0/3,0/4,0/1,0/2,0/3,0/12,0/10)
x<-data.frame(oui,non)
p<-round(x*100,2)
p
name=c("Certification", "Domaine application", "Termes et définitions",
"Exigences SME", "Politique environnementale", "Planification",
"Mise en oeuvre et fonctionnement", "Communication", "Documentation",
"Maitrise documentation", "Maitrise opérationnelle", "Situation urgence",
"ContrĂ´le", "Revue de direction")
Type=c("Oui"," Non")
df3 <- data.frame(x=p , y=name)
df3
ggplot(df3, aes(name, p)) +
geom_bar(stat="identity")
- How can I put the percentage in the Bar Plot (ggplot2) ??
because I had a problem adding percentages to a barplot with ggplot2.
Thank you advance.