I have a data frame that looks like this:
Name StartDate EndDate
A 12/12/2012 12/15/2012
B 11/11/2012 11/14/2012
For each row in the above, I want to generate rows with an additional column called "Date" that has a range between the start and end dates above. So, the data frame above would yield another data frame:
Name StartDate EndDate Date
A 12/12/2012 12/15/2012 12/12/2012
A 12/12/2012 12/15/2012 12/13/2012
A 12/12/2012 12/15/2012 12/14/2012
A 12/12/2012 12/15/2012 12/15/2012
B 11/11/2012 11/14/2012 11/11/2012
B 11/11/2012 11/14/2012 11/12/2012
B 11/11/2012 11/14/2012 11/13/2012
B 11/11/2012 11/14/2012 11/14/2012
I found the seq.Date()
function that can create the list of dates needed, but I'm not sure how to apply this to each row without using a for loop.