title: plotting subset of grouped data in ggplot2
body: <p>I am trying to make a plot that has mean (+/- SD) number (<code>ID</code> = total count per row) of <code>Explorations</code> on the y-axis and then grouped by both <code>pp</code> and <code>type</code> on the x-axis. </p>
  
  <p>That is, I want to generate something that looks like this (hand-drawn and made up graph):
  <a href="https://i.stack.imgur.com/M34Kk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M34Kk.jpg" alt="enter image description here"></a></p>
  
  <p>Here is how the dataframe is structured (available <a href="https://figshare.com/s/ace5b44bc12394a7c46d" rel="nofollow noreferrer">here</a>).</p>
  
  <pre><code>pp crossingtype    km type  ID
  0     Complete  80.0  DCC  10
  1     Complete  80.0  DCC   4
  0  Exploration  80.0  DCC  49
  1  Exploration  80.0  DCC   4
  0     Complete 144.0  DWC 235
  1     Complete 144.0  DWC  22
  0  Exploration 144.0  DWC 238
  1  Exploration 144.0  DWC  18
  1  Exploration  84.0   PC  40
  0     Complete 107.0   PC  43
  1     Complete 107.0   PC  22
  0  Exploration 107.0   PC 389
  </code></pre>
  
  <p>I want to use <code>ggplot2</code> and have tried this code:</p>
  
  <pre><code>ggplot(expMean, aes(x=as.factor(pp), y=crossingtype, color=factor(type),group=factor(type))) 
      + geom_point(shape=16,cex=3) 
      + geom_smooth(method=lm) 
      + facet_grid(.~type)
  </code></pre>
  
  <p>But it gives me this figure (which is not what I am trying to make).
  <a href="https://i.stack.imgur.com/LUKC4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LUKC4.jpg" alt="enter image description here"></a></p>
  
  <p>How can I use <code>ggplot2</code> to make the first plot?</p>