b********y 发帖数: 165 | 1 急问:
if I have a data set as:
id case
1 0
1 1
1 0
1 0
2 0
2 1
2 0
I want to change it as
id case
1 0
1 1
1 1
1 1
2 0
2 1
2 1
so whenever it hits one, the subsequent entries become 1.
Thanks so much !! | k*******a 发帖数: 772 | 2 you can use a flag to indicate if you hits 1, and retain the value of the
flag for later obs. | f**********m 发帖数: 157 | |
|