On Jul 4, 2009, at 9:22 PM, nyk wrote:


I have a data matrix containing quite a lot of missing values (NA). I know how to remove all column or rows containing NA values, but is there a some standard method for removing not all NA containing rows/column, but only
those which have significantly more NAs than others?

You have not defined what you mean by "significantly more than the others" so perhaps all you want to know is haw to count the NA's in a vector:

> x=c(1,2,3,NA, 5,6,NA)
> sum(is.na(x))
[1] 2


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
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