title: Subset Returns 0 Rows
body: <p>I am new to R. I tried to pull data from a data frame <code>A</code> using <code>subset</code>
  Data frame <code>A</code> looks like this:</p>
  
  <pre><code>col a       col b
  1            1     
  1           NA
  NA          NA
  1           1
  </code></pre>
  
  <p>I want to find out the group with col a = 1 and col b &lt;> 1
  My code:</p>
  
  <pre><code>test &lt;- subset(A, A$a == 1 &amp; A$b == NULL)
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>test &lt;- subset(A, A$a == 1 &amp; A$b &lt;&gt; 1)
  </code></pre>
  
  <p>test returns 0 rows.</p>
  
  <pre><code>sum(is.na(A$a))  
  </code></pre>
  
  <p>results: 5126</p>
  
  <pre><code>sum(is.na(A$b))
  </code></pre>
  
  <p>results: 6753</p>
  
  <p>What is better ways to pull data using R?</p>