First, how do I change NA into anything?
x[x==NA] <- "anything"
This does not work.
Also, how do I delete a row in a dataframe with condition on NA? For example:
    [,1][,2][,3]
[1,]  NA  NA 284
[2,] 233 182 249
[3,] 177 201  NA
I want to delete the row which has 2 or more NA in that particular row, so it will result in:
    [,1][,2][,3]
[2,] 233 182 249
[3,] 177 201  NA
Someone marked my question duplicated, but actually I want to control the amount of NA to delete a row, complete.cases(x) cannot provide any control to it.
 
     
     
     
     
    