Re: [R] finding "chuncks" of data that have no NA s

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Fri, 18 Jul 2008 07:50:19 -0400

na.contiguous.zoo() will return the longest stretch of non-NA data. Its a zoo method of the na.contiguous generic in the core of R.

rle(!is.na(rowSums(coredata(z)))) will find all stretches.

On Fri, Jul 18, 2008 at 6:47 AM, stephen sefick <ssefick_at_gmail.com> wrote:
> I have a data frame that is 122 columns and 70000ish rows it is a zoo
> object, but could be easily converted or read in as something else. It is
> multiparameter multistation water quality data - there are a lot of NA s. I
> would like to find "chuncks" of data that are free of NA s to do some
> analysis. All of the data is numeric. Is there a way besides graphing to
> find these NA less "chuncks". I did not include data because of the size of
> the data frame, and because I don't know exactly how to tackle this
> problem. I will send a subset of the data to the list if requested and when
> I get to work. As for reproducible code I am not entirly sure how to go
> about this, so that too is missing.
> Sorry for breaking the rules this early in the morning,
>
> Stephen
>
> --
> Let's not spend our time and resources thinking about things that are so
> little or so large that all they really do for us is puff us up and make us
> feel like gods. We are mammals, and have not exhausted the annoying little
> problems of being mammals.
>
> -K. Mullis
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> 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.
>



R-help_at_r-project.org mailing list
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. Received on Fri 18 Jul 2008 - 12:19:38 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 18 Jul 2008 - 13:31:56 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive