I am trying to get all rows where specific values (here RATIO1 and RATIO 2) are NaN an keep them.
consider a data frame like
data.frame(ID=c(1,2,4,6,7),RATIO1=c(NaN,NaN,0.2,9.5,6),
RATIO2=c(NaN,NaN,0.5,NaN,6), RATIO3=c(0.3,0.2,4,NaN,5))
ID RATIO1 RATIO2 RATIO3
1 1 NaN NaN 0.3
2 2 NaN NaN 0.2
3 4 0.2 0.5 4
4 6 9.5 NaN NaN
5 7 6 6 5
I want it to look like this
ID RATIO1 RATIO2 RATIO3
1 1 NaN NaN 0.3
2 2 NaN NaN 0.2
I could make it using is.na() or complete.cases () <- this will delete the rows.
Thx