title: Counting the frequency of an element in a data frame
body: <p>I have the following data frame</p>
  
  <pre><code>SelectVar
  
     b    c    e    f    g    h    j 
  1 Dxa2 Dxa2 Dxa2 Dxa2 Dxa2 Dxa2 Dxa2
  2 Dxb2 Dxb2 Dxb2 Dxb2 Dxc2 Dxc2 Dxc2
  3 Dxd2 Dxi2 tneg tpos Dxd2 Dxi2 tneg
  </code></pre>
  
  <p>When applying count I get</p>
  
  <pre><code>count(SelectVar)
  
     b    c    e    f    g    h    j   freq
  1 Dxa2 Dxa2 Dxa2 Dxa2 Dxa2 Dxa2 Dxa2   1
  2 Dxb2 Dxb2 Dxb2 Dxb2 Dxc2 Dxc2 Dxc2   1
  3 Dxd2 Dxi2 tneg tpos Dxd2 Dxi2 tneg   1
  </code></pre>
  
  <p>When I apply </p>
  
  <p>count(SelectVar==Dxa2)</p>
  
  <pre><code>     b     c     e     f     g     h     j     freq
  1 FALSE FALSE FALSE FALSE FALSE FALSE FALSE     1 
  </code></pre>
  
  <p>I can not figure out how to count the frequency of the different elements Dxa2, Dxb2... in SelectVar</p>