On 15-03-2013, at 17:08, Ray Cheung <ray1...@gmail.com> wrote:

> Dear All,
> 
> I've an array with some missing values (NA) in between. I want to remove
> that particular matrix if a missing value is detected. How can I do so?
> Thank you very much.


It is not clear what the dimension of your array is.

If your array/matrix is two dimensional, then then

any(is.na(A))  # A is the name of the array/matrix

will return TRUE is at least one element of A is NA. And then you can delete A.

If you array has three dimensions then you'll have to look at arun's solution.

Berend
______________________________________________
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