title: Getting table() to return zeroes in R
body: <p>This is my first question, and I'm quite new to <strong>R</strong> and I haven't been able to find how to do it. </p>
  
  <p>So I get some numbers that I want to put into table of frequencies.</p>
  
  <pre><code>12  0 12  2  1 14  1  1  0  3  1  2  8  0  1  3 11  1  1  8  8  8  0  4  4
   2  6  1  1  4  1  1  7  0  6  4  6  1  1  1  1  2  4  2  3  7  3  1  1  7
   0  0 11  8  1  5  0  5  6  0  0  0 13  1  1  5  2  7  2  1  7  3  4  4  2
   4  0  4  4  0  4  0  2  1  1  1  0  5  6  1  4  1  5  3  3  4  0  3  1  0
  </code></pre>
  
  <p>When I use the function <code>table(X)</code>, I get something that looks like</p>
  
  <pre><code>X
   0  1  2  3  4  5  6  7  8 11 12 13 14 
  
  17 27  9  8 13  5  5  5  5  2  2  1  1 
  </code></pre>
  
  <p>Which leaves out the values 9 and 10! I am trying to make the values 9, 10 appear with zero count.</p>
  
  <p>I have tried using <code>xtabs</code> and <code>tapply</code>, but I'm just not sure how to do this.</p>