title: Dealing with TRUE, FALSE, NA and NaN
body: <p>Here is a vector</p>
  
  <pre><code>a &lt;- c(TRUE, FALSE, FALSE, NA, FALSE, TRUE, NA, FALSE, TRUE)
  </code></pre>
  
  <p>I'd like a simple function that returns <code>TRUE</code> everytime there is a <code>TRUE</code> in "a", and <code>FALSE</code> everytime there is a <code>FALSE</code> or a <code>NA</code> in "a".</p>
  
  <p>The three following things do not work</p>
  
  <pre><code>a == TRUE
  identical(TRUE, a)
  isTRUE(a)
  </code></pre>
  
  <p>Here is a solution</p>
  
  <pre><code>a[-which(is.na(a))]
  </code></pre>
  
  <p>but it doesn't seem to be a straightforward and easy solution</p>
  
  <p><strong>Is there another solution ?</strong></p>
  
  <p>Here are some functions (and operators) I know:</p>
  
  <pre><code>identical()
  isTRUE()
  is.na()
  na.rm()
  &amp;
  |
  !
  </code></pre>
  
  <ul>
  <li><p>What are the other functions (operators, tips, whatever,...) that are
  useful to deal with <code>TRUE</code>, <code>FALSE</code>, <code>NA</code>, <code>NaN</code>?</p></li>
  <li><p>What are the differences between <code>NA</code> and <code>NaN</code>?</p></li>
  <li><p>Are there other "logical things" than <code>TRUE</code>, <code>FALSE</code>, <code>NA</code> and <code>NaN</code>?</p></li>
  </ul>
  
  <p>Thanks a lot !</p>