[R] Removing columns that are all NA from a matrix

Martin Waller martinej.waller at ntlworld.com
Thu Feb 14 13:59:46 CET 2008


Hi,

I guess this might be a FAQ or something, and there's probably a nice 
simple way to do it, but I can't think of it:

Given a matrix, I want to remove columns that are _entirely_ filled with 
NAs (partial NAs are fine).

How please?

Thanks,

Martin



More information about the R-help mailing list