Edit: Here's the data:
date<-c("20130107", "20130109", "20130111", "20130111", "20130113", "20130114", "20130114", "20130122", "20130125", "20130125", "20130128")
ID<-c("Blue","Red","Red","Red","Red","Red","White","Green","Black","Purple","Purple")
date_ID<-c("20130107 Blue", "20130109 Red", "20130111 Red", "20130111 Red", "20130113 Red", "20130114 Red", "20130114 White", "20130122 Green", "20130125 Black", "20130125 Purple", "20130128 Purple")
perc_yes<-c(-0.10394265, -1.00000000, -1.00000000, -1.00000000, -1.00000000, -1.00000000, -0.40425532, -0.09297913, -1.00000000, -0.17864924, -0.12353401)
perc_no<-c(0.8960573, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.5957447, 0.9070209, 0.0000000, 0.8213508, 0.8764660)
data<-data.frame(date,ID,date_ID,perc_yes,perc_no)
I have a dataframe that looks like:
date ID date_ID perc_yes perc_no
1 20130107 Blue 20130107 Blue -0.10394265 0.8960573
2 20130109 Red 20130109 Red -1.00000000 0.0000000
3 20130111 Red 20130111 Red -1.00000000 0.0000000
4 20130111 Red 20130111 Red -1.00000000 0.0000000
5 20130113 Red 20130113 Red -1.00000000 0.0000000
6 20130114 Red 20130114 Red -1.00000000 0.0000000
7 20130114 White 20130114 White -0.40425532 0.5957447
8 20130122 Green 20130122 Green -0.09297913 0.9070209
9 20130125 Black 20130125 Black -1.00000000 0.0000000
10 20130125 Purple 20130125 Purple -0.17864924 0.8213508
11 20130128 Purple 20130128 Purple -0.12353401 0.8764660
It lists the date, ID, and then the date and ID which is how they were grouped, percentage yes and percentage no. I'd like to make a bar graph by date and ID that is in chronological order and the bars are grouped together if they are on the same date but different IDs. The percentage yes's are negative as I'd like them to fall in the negative y direction directly underneath the percentage no's.
I tried barplot with no success as there's multiple data points and stacking. Is there a way to add multiple barplot points like with lines() in the plot function? How would I go about plotting the data? Would it be better to use ggplot (of which I am somewhat unfamiliar)?