I have a data set consisting of two columns: 1) calendar dates and 2) a binary coded event (it's coded as 1 or 2, but could just as easily be 0 and 1). The events alternate in blocks of dates. For example:
1/1/10 1
1/2/10 1
1/3/10 1
1/4/10 2
1/5/10 2
1/6/10 1
I need to calculate the length (number of days) of each block as well as the start and end date for each block as well as the corresponding event code value.
Any suggestions would be greatly appreciated.
Bookmarks