title: Is there a way to complete or expand an interval factor variable
body: <p>I have a data frame/tibble that includes a factor variable of bins. There are missing bins because the original data did not include an observation in those 5-year ranges. Is there a way to easily complete the series without having to deconstruct the interval?</p>
  <p>Here's a sample df.</p>
  <pre><code>library(tibble)
  
  df &lt;- structure(list(bin = structure(c(1L, 3L, 5L, 6L, 7L, 8L, 9L, 
  10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L), .Label = c(&quot;[1940,1945]&quot;, 
  &quot;(1945,1950]&quot;, &quot;(1950,1955]&quot;, &quot;(1955,1960]&quot;, &quot;(1960,1965]&quot;, &quot;(1965,1970]&quot;, 
  &quot;(1970,1975]&quot;, &quot;(1975,1980]&quot;, &quot;(1980,1985]&quot;, &quot;(1985,1990]&quot;, &quot;(1990,1995]&quot;, 
  &quot;(1995,2000]&quot;, &quot;(2000,2005]&quot;, &quot;(2005,2010]&quot;, &quot;(2010,2015]&quot;, &quot;(2015,2020]&quot;, 
  &quot;(2020,2025]&quot;), class = &quot;factor&quot;), Values = c(2L, 4L, 14L, 11L, 
  8L, 26L, 30L, 87L, 107L, 290L, 526L, 299L, 166L, 502L, 8L)), row.names = c(NA, 
  -15L), class = c(&quot;tbl_df&quot;, &quot;tbl&quot;, &quot;data.frame&quot;))
  
  df
  # A tibble: 15 x 2
     bin         Values
     &lt;fct&gt;        &lt;int&gt;
   1 [1940,1945]      2
   2 (1950,1955]      4
   3 (1960,1965]     14
   4 (1965,1970]     11
   5 (1970,1975]      8
   6 (1975,1980]     26
   7 (1980,1985]     30
   8 (1985,1990]     87
   9 (1990,1995]    107
  10 (1995,2000]    290
  11 (2000,2005]    526
  12 (2005,2010]    299
  13 (2010,2015]    166
  14 (2015,2020]    502
  15 (2020,2025]      8
  </code></pre>
  <p>I would like to add the missing <code>(1945,1950]</code> and <code>(1955,1960]</code> bins.</p>