[R] Removing rows with missing values

Gabor Grothendieck ggrothendieck at gmail.com
Wed Mar 22 05:01:08 CET 2006


Check out

?na.omit
?complete.cases


On 3/21/06, Ashraf Chaudhary <mchaudha at jhsph.edu> wrote:
> Dear Colleagues:
>
> I have a question that is probably too simple but I could not get it.
>
> How to remove all the rows of a data table with missing values?
>
> Let us say my data table is
>
> 1  2  4
> 3  .   5
> 2  7  .
> 6  7  8
>
> The result should be,
>
> 1 2 4
> 6 7 8
>
> Thank you,
>
> Ashraf
>
>
> ----------------
>
> _________________________________
> M. Ashraf Chaudhary, Ph.D.
> Department of International Health
> Johns Hopkins Bloomberg School of Public Health
> 615 N. Wolfe St.  Room W5506
> Baltimore MD 21205-2179
>
> (410) 502-0741/fax: (410) 502-6733
>  <mailto:mchaudha at jhsph.edu> mchaudha at jhsph.edu
>
>
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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
>




More information about the R-help mailing list