4-01 16
#&gt; 2  2016-05-01  0
#&gt; 3  2016-06-01  0
#&gt; 4  2016-07-01 10
#&gt; 5  2016-08-01 14
#&gt; 6  2016-09-01  0
#&gt; 7  2016-10-01 17
#&gt; 8  2016-11-01  0
#&gt; 9  2016-12-01 15
#&gt; 10 2017-01-01 12
#&gt; 11 2017-02-01  0
#&gt; 12 2017-03-01  0
#&gt; 13 2017-04-01 16</div><div class='input'>
<span class='co'># padding a data.frame on group level</span>
<span class='no'>day_var</span> <span class='kw'>&lt;-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/s