I have a dataset as follows
Id Date1
121 2011-01-03
121 2011-01-03
121 2011-04-02
121 2011-08-14
121 2012-01-14
121 2012-05-12
975 2011-02-01
975 2011-02-01
975 2011-06-14
975 2012-01-06
975 2012-04-19
975 2012-09-25
What I want to create is an output like this below, where the new Date2 column is offset by one value based on the id,
Id Date1 Date2
121 2011-01-03 2011-01-03
121 2011-01-03 2011-04-02
121 2011-04-02 2011-08-14
121 2011-08-14 2012-01-14
121 2012-01-14 2012-05-12
121 2012-05-12 NA
975 2011-02-01 2011-02-01
975 2011-02-01 2011-06-14
975 2011-06-14 2012-01-06
975 2012-01-06 2012-04-19
975 2012-04-19 2012-09-25
975 2012-09-25 NA
Date2 column row 2 for Id 121 i.e 2011-01-03 becomes Date1 column, row1 value for Id 121.
Date2 column row3 for Id 121 i.e 2011-04-02 becomes Date1 column, row2 value for Id 121....so on...This should happen by id.
Any help is appreciated.