title: Exclude data in R based on minimum sample size
body: <p>I have a data frame that looks kind of like this: </p>
  
  <pre><code>#1  sampleid     replication    measurement
  #2  1            1              0.5
  #3  1            2              0.4
  #4  1            3              0.3
  #5  1            4              0.2
  #6  1            5              0.3
  #7  2            1              0.5
  #8  3            1              0.5
  #9  4            1              0.5
  #10 4            2              0.3
  #11 4            3              0.2
  #12 5            1              0.1
  </code></pre>
  
  <p>This is my second day with R so I'm sorry if this is a rather simple task. </p>
  
  <p>What I would like to do is exclude "measurement" and "sampleid" if the corresponding "replication" is &lt;2. Based on the sample I gave, I'd like to see exclusions in lines #7, #8, and #12. </p>
  
  <p>I tried using a combination of <code>subset</code> and <code>length</code>, but it didn't achieve what I needed. Is there a simple way that I'm missing?</p>
  
  <p>Thanks a lot. </p>