title: Frequency count based on two columns
body: <p>I know a lot has been posted on getting frequency counts based on two columns, and it is working for me in a way - except for the fact that it takes one of my variables and makes those values into row numbers. I'd like to just have 'normal' row numbers and have both variables as features in a dataframe.</p>
  
  <p>Data example looks as follows:</p>
  
  <pre><code>sport        cell
  football     A1
  tennis       A2
  tennis       A1
  gym          A3
  </code></pre>
  
  <p>What I'd like to achieve is a count of the number of sports per cell:</p>
  
  <pre><code>    cell    tennis    football    gym
  1   A1      1         1           0
  2   A2      1         0           0
  3   A3      0         0           1
  </code></pre>
  
  <p>Using the following code, it makes the cell feature into row names:</p>
  
  <pre><code>data.frame(table(data$cell, data$sport)[,]) 
  
          tennis    football    gym
  A1      1         1           0
  A2      1         0           0
  A3      0         0           1
  </code></pre>
  
  <p>Also, I've tried to assign numbers to each row and table the three features as follows:</p>
  
  <pre><code>data.frame(table(data$cell, data$sport, data$rownumber)[,]) 
  </code></pre>
  
  <p>But that just gives me an error. </p>
  
  <p>Any help would be highly appreciated!</p>