I have a dataframe with groups by country and rows with date, in some countries there are no rows for some dates, I would like to fill these missing rows with a 0 value
For example:
dd <- tibble( region=rep("Aus",8), date=c("2000-11-01","2000-12-01","2001-01-01","2001-02-01","2001-03-01","2001-04-01","2001-05-01","2001-06-01"), value=runif(8))
dd <- bind_rows(dd,tibble( region=rep("Est",6), date=c("2000-11-01","2001-01-01","2001-02-01","2001-04-01","2001-05-01","2001-06-01"), value=runif(6)))
I need to add two rows for the group Est
with missing dates 2000-12-01
2001-03-01
with value=0
I can't figure out how to make this for a general case using dplyr or base