title: Inserting missing years to complete a data.frame
body: <p>I'm creating a dataframe containing the number of incidents of a certain kind in each state in each year from 2000 to 2010 (pretend that they are gun incidents):</p>
  
  <pre><code>states &lt;- c('Texas', 'Texas', 'Arizona', 'California', 'California')
  incidents &lt;- c(1, 1, 2, 1, 4)
  years &lt;- c(2000, 2008, 2004, 2002, 2007)
  
  DF &lt;- data.frame(states, incidents, years)
  
  &gt; DF
        states incidents years
  1      Texas         1  2000
  2      Texas         1  2008
  3    Arizona         2  2004
  4 California         1  2002
  5 California         4  2007
  </code></pre>
  
  <p>I want to insert rows to complete the dataset, e.g. zeros for Texas for 2001, 2002, 2003, ... 2007, and for 2009 and 2010. And likewise, zeros for Arizona for all years except 2004. Same thing for California.</p>
  
  <p>How can I do this?</p>