Julius
unread,Jun 14, 2012, 6:58:28 PM6/14/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggp...@googlegroups.com
Hi everyone,
I posted this in another forum but I cannot get the answers or results that I wanted. I have a dataframe:
p3 <- structure(list(test = c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,4,5,5,5,5,5),
result = c(26.88,24.53,24.02,20.33,22.01,19.84, 19.69,19.84,19.24,19.24,34.36,33.28,33.82,33.82,32.47,25.55,26.90,25.40,24.20,25.85,25.70,24.95,18.65,18.65,17.80,18.65,18.31)
), .Names = c("test", "result"), row.names = c(NA, -27L), class = "data.frame")
I wanted to make a 'dodged' barplot with 'test' in the x-axis and 'result' in the y-axis using the following:
ggplot(p3, aes(x = test, y = result))+ geom_bar(position="dodge", stat="identity")
Somehow I could not make it work. I have been using this code before but ever since I upgraded to the latest ggplot2 package, it was not behaving well. Can someone help me to fix this?
Cheers,