s-news
[Top] [All Lists]

Length of a run of contiguous values above a threshold

To: S-News <s-news@wubios.wustl.edu>
Subject: Length of a run of contiguous values above a threshold
From: Kim Elmore <elmore@nssl.noaa.gov>
Date: Thu, 26 Jul 2001 09:15:37 -0500
I'm faced with a simple task that I'm almost sure I've done (or seen done) before, but that I can't recall. Within a vector, I want to identify the length of contiguous runs of numeric data that are above a certain (arbitrary) threshold. I was sure that a native S-Plus function exists that does this, but I can't find it if there is one.

I can kludge/hack my own if need be (S Programming is a marvelous book, but it's hard to get past some of my old F77 habits), but if there's something already there that I've overlooked, I'd prefer to use it.

Thanks to everyone for such a marvelous list!

Kim Elmore
                          Kim Elmore, Ph.D.
"All of weather is divided into three parts: Yes, No, and Maybe. The
greatest of these is Maybe" The original Latin appears to be garbled.


<Prev in Thread] Current Thread [Next in Thread>
  • Length of a run of contiguous values above a threshold, Kim Elmore <=