title: R how many element satisfy a condition?
body: <p>Is there a better way to count how many elements of a result satisfy a condition?</p>
  
  <pre><code>a &lt;- c(1:5, 1:-3, 1, 2, 3, 4, 5)
  b &lt;- c(6:-8)
  u &lt;- a &gt; b
  length(u[u == TRUE])
  ## [1] 7
  </code></pre>