Re: [R] Quick question: Omitting rows and cols with certain percents of missing values

From: John Kane <jrkrideau_at_yahoo.ca>
Date: Fri, 13 May 2011 07:15:32 -0700 (PDT)

> From: Vickie S <isvik_at_live.com>
> Subject: [R] Quick question: Omitting rows and cols with certain percents of missing values
> To: r-help_at_r-project.org
> Received: Friday, May 13, 2011, 9:42 AM
>
> Hi
> naive question.
> It is possible to get R command for omitting rows or col
> with missing values present.

http://tolstoy.newcastle.edu.au/R/help/04/11/6887.html Slightly adapted

(mydata <- data.frame(matrix(c(1,2,3,4,5,6,7,8, NA),3)))  mydata[apply(mydata, 1, function(x)!any(is.na(x))), , drop=TRUE]

> But
> if i want to omit rows or cols with i.e . >20% missing> values,
> couldīt find any package-based command, probably because
> it is to
> simple for anyone to do that manually, though not for me.
> Can anyone
> please help me ?
>
> - vickie
I'd have to think about this. Hopefully a guru can come up with something quickly.



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 13 May 2011 - 14:18:14 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 13 May 2011 - 14:40:07 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