Convert all columns in data frame to character
util_df_convert_character(df)
A dataframe
A dataframe
lapply(traits.build:::util_df_convert_character(dplyr::starwars), class)
#> $name
#> [1] "character"
#>
#> $height
#> [1] "character"
#>
#> $mass
#> [1] "character"
#>
#> $hair_color
#> [1] "character"
#>
#> $skin_color
#> [1] "character"
#>
#> $eye_color
#> [1] "character"
#>
#> $birth_year
#> [1] "character"
#>
#> $sex
#> [1] "character"
#>
#> $gender
#> [1] "character"
#>
#> $homeworld
#> [1] "character"
#>
#> $species
#> [1] "character"
#>
#> $films
#> [1] "character"
#>
#> $vehicles
#> [1] "character"
#>
#> $starships
#> [1] "character"
#>