2
Good morning, I have a base with ID, start date and end date. I wanted to generate a basis that each row be one day within the range with an ID column. Groundwork:
base <- data.frame( ID = c("A","B","C"),
data_inicio = c("2010-01-05", "2010-01-07", "2020-11-30"),
data_fim = c("2010-01-07", "2010-01-09", "2020-12-03"))
The exit would be:
DATE ID
A 2010-01-05
A 2020-01-06
A 2020-01-07
B 2020-01-07
B 2020-01-08
etc....
I need a line for each date. The suggestion you put gives me the difference of days between the variables data_start and data_end.
– Rubens C.
Talk Rubens, all good? I added a new answer. I hadn’t really looked at the exit you were expecting. Hug!!
– lmonferrari