date time td number
20150102 80000 -1 0
20150102 80001 -1 2
20150102 80002 1 0
20150102 80003 1 3
20150102 80004 -1 0
I need to create append number of rows based on variable "number". And let date and time be the same as the numbered rows, while the variable td=0. I want the data like this:
date time td number
20150102 80000 -1 0
20150102 80001 -1 2
20150102 80002 1 0
20150102 80003 1 3
20150102 80004 -1 0
20150102 80001 0 NA
20150102 80001 0 NA
20150102 80003 0 NA
20150102 80003 0 NA
20150102 80003 0 NA