title: Reshaping data with count
body: <p>I have a dataset and I want to reshape it with package reshape2 from R, but I'm getting this error:</p>
  
  <pre><code>Aggregation function missing: defaulting to length
  </code></pre>
  
  <p>This is the head() of my data:</p>
  
  <pre><code>cat_one customer valor
  cama        A     1
  cama        B     1
  cama        C     1
  mesa        D     1
  mesa        A     1
  mesa        A     1
  </code></pre>
  
  <p>And I want to reshape it like this, with a count between both variables:</p>
  
  <pre><code>customer     cama    mesa
  A             1       0
  B             2      ...
  C
  D            ...     ...
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>dcast(dados_teste, cat_one ~ customer, value.var = 'valor')
  </code></pre>
  
  <p>And I'm following this other <a href="https://stackoverflow.com/questions/8093839/reshape-data-for-values-in-one-column">question</a>, but the same solution is not working for me.</p>