I was trying to recode using mutate and recode

I tried to recode using mutate and recode. I am new to this. and stuggling. Plaese help

DM_data %>% mutate(Sex= recode(Sex, "a" = "M", "b" = "F"))

Error message came as

Error in UseMethod("mutate_") :
no applicable method for 'mutate_' applied to an object of class "NULL"

The error message is telling you that DM_data contains nothing and it should be a data frame, you should start by checking on that.

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.

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.