title: summarize original data based on expand grid categories
body: <p>I would like to summarize a table using dplyr. 
  Here is how I would like to proceed:</p>
  
  <ul>
  <li>I have a data.frame like this:</li>
  </ul>
  
  <pre><code> year    region week  site           species    gps_clutch
  2017    sud   18     6                  au        337
  2017    sud   20     10                 au        352
  2017    sud   22     10                 au        352
  2017    sud   24     10                 au        352
  2017    sud   18     6                  aio       337
  2017    sud   20     6                  aio       352
  2017    sud   22     6                  au        352
  2018    sud   20     6                  au        337
  2018    sud   20     10                 au        352
  2018    sud   22     10                 au        352
  2018    sud   22     10                 aio       352
  2018    sud   22     6                  au        352
  2017    nor   19     5                  au        337
  2017    nor   21     2                  au        352
  2017    nor   23     5                  au        352
  2017    nor   25     2                  au        352
  2017    nor   19     5                  aio       337
  2017    nor   25     5                  aio       352
  2017    nor   19     5                  au        337
  2018    nor   21     2                  aio       352
  2018    nor   23     5                  aio        352
  2018    nor   25     2                  au        352
  2018    nor   23     5                  aio       337
  2018    nor   23     5                  au       352
  </code></pre>
  
  <ul>
  <li>I would like to count the number of "gps_clutch" for each year, region, site, week and expand this all the possible weeks recorded for each region. I explain: in the region "sud" I sampled week 18, 20, 22, 24 and in the region "nor" week 19, 21, 23, 25. I would like to convert implicit missing values by "0" but only for the weeks (nested in regions) that have been sampled.  I do not want to expand in a way that I would get a row for week 19 in region "sud" because this region was not sampled that specific week.</li>
  </ul>
  
  <p>this code works well to expand the grid as I would like: </p>
  
  <pre><code>dat %&gt;%
    group_by(region) %&gt;%
    expand(year,site, species,week)
  </code></pre>
  
  <p>the following code works too, to get the count values but does not expand the grid as I wish (I only get the list of weeks for which I did observe something for each year, not the total number of weeks sampled across both years). Which mean that if in "sud" "2017" I only have records for weeks 20 and 22, the grid will not get expanded to week 18 and 24 :</p>
  
  <pre><code>field_subsetnord %&gt;%
    group_by(year,region,site,species,week) %&gt;%
    summarise(count_clutch=length(gps_clutch)) %&gt;% 
    complete(week,nesting(year,sites,species), fill = list(count_clutch = 0))
  </code></pre>
  
  <p>this is the table I would like to get at the end:</p>
  
  <pre><code> year    region week  site           species    count
  2017     sud    18     6             au         1
  2017     sud    20     6             au         0
  2017     sud    22     6             au         1
  2017     sud    24     6             au         0
  
  2017     sud    18     6             aio        1
  2017     sud    20     6             aio        1
  2017     sud    22     6             aio        0
  2017     sud    24     6             aio        0
  
  2017     sud    18     10            au         0
  2017     sud    20     10            au         1
  2017     sud    22     10            au         1
  2017     sud    24     10            au         1
  
  2017     sud    18     10            aio        0
  2017     sud    20     10            aio        0
  2017     sud    22     10            aio        0
  2017     sud    24     10            aio        0
  
  2018     sud    18     6             au        0
  2018     sud    20     6             au        1
  2018     sud    22     6             au        1
  2018     sud    24     6             au        0
  
  2018     sud    18     6             aio       0
  2018     sud    20     6             aio       0
  2018     sud    22     6             aio       0 
  2018     sud    24     6             aio       0
  
  2018     sud    18     10            au        0
  2018     sud    20     10            au        1
  2018     sud    22     10            au        1
  2018     sud    24     10            au        0
  
  2018     sud    18     10            aio       0
  2018     sud    20     10            aio       0
  2018     sud    22     10            aio       1
  2018     sud    24     10            aio       0
  
  and so on for 2018...
  </code></pre>
  
  <p>any suggestions to mix these two codes would be appreciated :)</p>