0

Mymatrix is a data frame and remove several columns from this frame. Then I also want to remove all the NAN element from the new data frame. But the code below does not show a correct answer.

OKHS <- Mymatrix[,c(-6,-7,-12,-13,-14),na.rm=TRUE]
FortranFun
  • 156
  • 1
  • 11
  • A [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) might help. – Ronak Shah Sep 21 '17 at 01:13

1 Answers1

0

Suggested code:

OKHS <- na.omit(Mymatrix[,c(-6,-7,-12,-13,-14)])
jay.sf
  • 60,139
  • 8
  • 53
  • 110
Jeremy_Tamu
  • 725
  • 1
  • 8
  • 21