Skip to contents

Coerce numeric columns to character

Usage

df_2_chr(df)

Arguments

df

<data.frame> or <tibble>

Value

A <data.frame> or <tibble> with numeric columns coerced to character

Examples

dplyr::tibble(
   int = 1:10,
   chr = letters[1:10],
   date = rep(Sys.Date()), nrow(int)) |>
df_2_chr()
#> # A tibble: 10 × 3
#>    int   chr   date      
#>    <chr> <chr> <chr>     
#>  1 1     a     2024-10-15
#>  2 2     b     2024-10-15
#>  3 3     c     2024-10-15
#>  4 4     d     2024-10-15
#>  5 5     e     2024-10-15
#>  6 6     f     2024-10-15
#>  7 7     g     2024-10-15
#>  8 8     h     2024-10-15
#>  9 9     i     2024-10-15
#> 10 10    j     2024-10-15