I have a mixed dataframe of character and numeric variables.
city,hs_cd,sl_no,col_01,col_02,col_03 Austin,1,2,,46,Female Austin,1,3,,32,Male Austin,1,4,,27,
Another alternative is to use a combination of mutate_if() and str_to_uper() function, both from the tidyverse package:
mutate_if()
str_to_uper()
df %>% mutate_if(is.character, str_to_upper) -> df
This will convert all string variables in the data frame to upper case. str_to_lower() do the opposite.
str_to_lower()