--- On Fri, 5/13/11, Vickie S <is...@live.com> wrote:

> From: Vickie S <is...@live.com>
> Subject: [R] Quick question: Omitting rows and cols with certain percents of 
> missing values
> To: r-help@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@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.

Reply via email to