title: How to connect points of different groups by a line using ggplot
body: <pre><code>df&lt;-data.frame(adjuster=c("Mary","Mary","Bob","Bob"), date=as.Date(c("2012-1-1","2012-2-1","2012-3-1","2012-4-1")), value=c(10,15,25,15))
  df
    adjuster       date value
  1     Mary 2012-01-01    10
  2     Mary 2012-02-01    15
  3      Bob 2012-03-01    25
  4      Bob 2012-04-01    15
  
  ggplot(df,aes(x=date,y=value,color=adjuster))+geom_line()+geom_point()
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ZAFHu.png" alt="enter image description here"></p>
  
  <p>In the above graph, notice the disconnect between the February and March points.  How do I connect those points with a blue line, leaving the actual March point red?  In other words, Bob should be associated with the value from [Jan - Mar) and Mary from [Mar-Apr].</p>
  
  <p>EDIT: Turns out my example was overly simple.  The answers listed don't generalize to the case where the adjuster changes between two people on more than one occasion.  For example, consider</p>
  
  <pre><code>df&lt;-data.frame(adjuster=c("Mary","Mary","Bob","Bob","Mary"), date=as.Date(c("2012-1-1","2012-2-1","2012-3-1","2012-4-1","2012-5-1")), value=c(10,15,25,15,20))
        adjuster       date value
  1     Mary 2012-01-01    10
  2     Mary 2012-02-01    15
  3      Bob 2012-03-01    25
  4      Bob 2012-04-01    15
  5     Mary 2012-05-01    20
  </code></pre>
  
  <p>Since I didn't mention this in my original question, I'll pick an answer that simply worked for my original data.</p>