title: Create Data Frame from IF Condition
body: <p>I've look for this question; however no examples seem to be as primitive as I need.</p>
  
  <p>I need to be able to create a data frame that contains only the true values from an IF condition.. for example:</p>
  
  <pre><code>if(sampleDF$column[1]== 1){
    newDF(sampleDF)
  }
  </code></pre>
  
  <p>In this example newDF should contain those rows from sampleDF where column has a value of 1</p>
  
  <p>Thanks in advance!</p>