[R] Method Guidance

Jeff Reichman re|chm@nj @end|ng |rom @bcg|ob@|@net
Wed Jan 12 01:56:20 CET 2022


R-Help Forum

 

Looking for a little guidance. Have an issue were I'm trying to determine
the time between when Event A happened(In days) to when a subsequent Event B
happens. For Example at Time 1 Evat A happens and subsequently Event B
happens at the same day (0) and the next day (1) then Event A happens again
at time 4 and Event B happens the next day and 3 days later so on and so
forth. I gather there is no function that will do that so I suspect I will
need to grate so sour of do while loop?  Any suggestions?

 

 

Time      Event_A               Event_B               Time_B

1              1                              1
0

2              0                              1
1                              

3              0                              0
0

4              1                              0
0

5              0                              1
1

6              0                              0
0

7              0                              1
3

8              1                              1
0

9              0                              0
0

10           0                              1                              2


 

Jeff Reichman    


	[[alternative HTML version deleted]]



More information about the R-help mailing list