[R] Grabbing Indexes of a certain standard deviation

gcm lvogric at grahamcapital.com
Thu Jul 12 18:07:49 CEST 2012

I have a graph of residuals and I am attempting to get a list of the indexes
of each time the residual is greater than 2 standard deviations or less than
-2 standard deviations, but only the first point of the section. And then
I'd also need the first point where the point returns to the range between
+/- 2 standard deviations.
So basically if my standard deviation=1 and my residuals=c(1, 2.1, 3, 4, 3,
1, 0, -4, -1) I want it to grab the second number, where it exceeds 2
standard deviations and the 6th where it returns to less than 2 standard
deviations. Also, it would grab -4 (or residuals[ 8]) and -1 (residuals[9])

View this message in context: http://r.789695.n4.nabble.com/Grabbing-Indexes-of-a-certain-standard-deviation-tp4636318.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list