unable to use "ifelse" function.

drug_in_bcx_window <- as.numeric(ifelse(df$antibiotic_administration - df$blood_culture <= 2, 0, 1))

Can someone please point out the mistake.

Should be administeration_ possibly

What error message do you get?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.