Re: [R] Finding indices of NA values in a data frame

From: Sundar Dorai-Raj <sundar.dorai-raj_at_pdf.com>
Date: Sat 09 Jul 2005 - 06:30:57 EST

Ken Termiso wrote:
> Hi all,
>
> I've got a data frame with NA values scattered throughout. I would like to
> find the rows which contain an NA. Trying to find the indices of the NAs
> with grep() doesn't work (apparently you can't convert NA to "NA" character
> value, even with as.character()) so I was hoping someone could tell me how
> to find rows which contain NA.
>
> Thanks in advance,
> -Ken
>

?is.na or ?complete.cases

--sundar



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jul 09 06:35:41 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:33:26 EST