[R] Skip NA and alter length

Syed Abid Hussaini ohitsabid at yahoo.com
Wed Nov 29 16:58:31 CET 2006


Hi,

This is my first post. 

Problem:

I have a matrix 5 by 5 and it has 3 NAs in them. Now, when i use length () for a particular column
which has NA it returns 5. I know this is true, but how do i change my matrix such that the length
becomes 5 minus the number of NAs i have. I know NA has a length of 1, but then how do i convert
the NA into NULL whose length is 0. 

Thanks in advance.

abid



More information about the R-help mailing list