title: ggplot in R: how to draw a line through corresponding dodged points
body: <p>I have a data set similar to the example data in the code below. I would like to connect the two points from the same ID in the two conditions, so as to better see the individual change from one condition to the other. Each individual is only part of one "group" but has a value for each of the two conditions. Thanks for any ideas! </p>
  
  <pre><code>library(ggplot2)
  library(ggthemes)
  ID &lt;- c(1,1,2,2,3,3,4,4,5,5)
  group &lt;- c(20,20, 50, 50,20, 20, 80, 80, 80, 80)
  condition &lt;- c("med", "placebo","med", "placebo","med", "placebo","med", "placebo","med", "placebo")
  PropYes &lt;- c(0.13, 0.15, 0.25, 0.13, 0.54, 0.34, 0.23, 0.45, 0.142, 0.344)
  exampleData &lt;- data.frame(ID, group, condition, PropYes)
  exampleData &lt;- within(exampleData, {
    group &lt;- as.factor(group)
    condition &lt;- as.factor(condition)
  })
  #plot
  p &lt;- ggplot(exampleData, aes(x = group, y = PropYes, fill = condition)) 
  p + geom_point(aes(colour = factor(condition)),position=position_dodge(width = 0.4)) + 
    theme_pander()+scale_color_ptol("condition") 
  </code></pre>