I have a long list of variables that I want to convert to factors. So, I did this:
factor_df <- original_df %>%
select(PhoneService:PaymentMethod) %>%
map(as.factor)
I get all the variables from PhoneService to PaymentMethod as factors.
How do I make this factor_df
to attach to original_df
again, so that the original_df
has all the appropriate data types?