> sum(is.na(indvar_FODs$categorical_FOD_FODs)) [1] 199 > sum(is.na(indvar_FODs$Gender_quantised_FODs)) [1] 1 how can I get only the not misisn variables for both of them equally?
indvar_FODs$categorical_FOD_FODs[which(!is.na(indvar_FODs$categorical_FOD_FODs))] indvar_FODs$ID[which(!is.na(indvar_FODs$categorical_FOD_FODs))] indvar_FODs$Gender_quantised_FODs[which(!is.na(indvar_FODs$categorical_FOD_FODs))]