Hello,
I'm trying to detect repeated values of length k in a vector of
measurements (a stuck sensor). I was thinking of something like
for (val in 1:(length(vector)-k+1)) {
if ( vector[val:(val+k)] == rep(vector[val],k) ) {#detection positive}
}
It's a long vector and there are many of them though... Is there a better
way?
Thanks for help,
Caitlin
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu. To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message: unsubscribe s-news