Hi pele,
There are probably more elegant ways to do this using some function,
but this might help:
psdat<-read.table(text="ID DATE ITEM
1 1/1/2014P1
1 1/15/2014 P2
1 1/20/2014 P3
1 1/22/2014 P4
1 3/10/2015 P5
2 1/13/2015 P1
2 1/20/2015 P2
2 1/28/2015 P3
2
I do not have the tenacity to decipher your logic, but I would suggest
that you go through an R tutorial or two instead of limiting yourself
to R-Help (not R forum?) archives. You probably are going about it
wrongly in R (I suspect you need indexing). In fact, I would guess
that you probably don't
Hello,
Iam looking for an R solution that can efficiently produce the output shown
below. I can produce this easily in SAS with retain statement and a few lines
of if-then-else logic, etc.. but I am not find anything similar on the Rforum
archives. Below is the logic I am trying to apply to pro
3 matches
Mail list logo