I have a data frame:
things <- data.frame( category = c("A","B","A","B","B","A","B"),
things2do = c("ball","ball","bat","bat","hockey","volley ball","foos ball"),
number = c(12,5,4,1,2,1,1))
now I want to add "0" in number where the particular category and things2do is missing e.g. a new row for "A", "hockey" and "0" should be added, same for volleyball, and foos ball.
I hope I can get some help here.