Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # To do it for all names
- col_names <- names(df_all)
- # do do it for some names in a vector named 'col_names'
- df_all[,col_names] <- lapply(df_all[,col_names] , factor)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement