[R] removing all NA rows from a data.frame

Taka Matzmoto sell_mirage_ne at hotmail.com
Sun May 27 21:27:45 CEST 2007


Dear R-users,

I have a data.frame having NA (e.g., 2nd, 4th rows, etc).

     Start End   Length Variable_name
[1,] "1"   "1"   "1"    "a"
[2,] NA    NA    NA     ""
[3,] "2"   "2"   "1"    "b"
[4,] NA    NA    NA     ""
[5,] "3"   "6"   "4"    "c"
[6,] "7"   "10"  "4"    "d"
:
:
:

I like to remove the rows having NA in the first column ("Start")
What is the most elegant way to do this? I think I can use for loop to 
remove.
I am looking for a better way.

Thanks

Taka,

_________________________________________________________________

Hotmail.



More information about the R-help mailing list