Hello, how can I apply fct_recode to the complete data.frame.
When using fct_recode, I can only apply it column by column.
my matrix (data frame) has 30 Variables (200 observations each). Some Variables are Numerical while others are Categorical. I want to transform all the Categorical (Yes/No) to 1 and 0.
Currently I am using:
recoding=c("1" = "Yes","0"="No")
fct_recode(mydata_cleaned$Var1, !!!recoding)
I want to be able to apply this to all the matrix as opposed to each Variables column individually.
thank you