LeonieHagitte / ShareSEM

0 stars 0 forks source link

NAs dont get coded by the respective command #11

Open LeonieHagitte opened 9 months ago

LeonieHagitte commented 9 months ago

NAs dont get coded by the respective command therefor they dont get erased from the df, which can pose a problem

cvr_notall[cvr_notall %in% c(-1, -2, -3, -4, -5, -7, -9, -10, -11, -12, -13, -14, -15, -16)] <- NA cvr_notall <- na.omit(cvr_notall)

later on this df (cvr_notall) gets transformed to the df we are then trying to use and thus we have "-5" as values, that should be NAs and should also been omitted as cases. But i dont know why the command is only working for the rest of the negative values.