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]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.