Skip to content
Back to formatted view

Raw Message

Message-ID: <1295056914048-3218653.post@n4.nabble.com>
Date: 2011-01-15T02:01:54Z
From: surreyj
Subject: Selecting the first occurrence of a value after an occurrence of a different value
In-Reply-To: <AANLkTikHqgAD_YH6d_c_=QV5ZHA0Z-DEeMgMbwKV2oyF@mail.gmail.com>

Thanks so much for your help everyone, got it sorted now :)

this is what I used in the end:

timeofonlyfirstresponseafterrft<-testdata$Time[test<-which(!diff(as.numeric(factor(Stat,
levels = c("MagDwn", "Resp")))))]
timeofonlyfirstresponseafterrft1<-as.POSIXct(timeofonlyfirstresponseafterrft,
origin="timeofstart[1]", format="%Y,%m,%d, %H, %M, %OS")

Cheers

Surrey
-- 
View this message in context: http://r.789695.n4.nabble.com/Selecting-the-first-occurrence-of-a-value-after-an-occurrence-of-a-different-value-tp3217340p3218653.html
Sent from the R help mailing list archive at Nabble.com.