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]
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]
Suggested code:
OKHS <- na.omit(Mymatrix[,c(-6,-7,-12,-13,-14)])