Question for mutate_at and string mismatches

I encountered a very confusing problem. When I run this code, I cannot get its results. Prompt to:
Error in mutate_at(., vars(oac_grp, sex, age_band, age_sex), ~factor(.)) :
There is no "mutate_at" function

and also There is no "%>%" function

There is also an error about string mismatches:

Thank you so much!

You need to load the relevant packages first:


individuals <- individuals %>% mutate_at(vars(oac_grp, sex,age_band, age_sex),~factor(.))

I have used install.packages("dplyr"). But it reminds me that There is no "%>%" function

These are different commands.
The first one you must do once to have dplyr on your system. The second one you need once in every subsequent r session if you want to use the dplyr functionality in that session.

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.