Remove whitespace from columns using a tidyselect specification.

remove_whitespace(.data, ...)

Arguments

.data

data frame

...

tidyselect specification (default selection: all character columns)

Value

data frame

Examples


tibble::tibble(a = c(" a ", "b ", " c")) -> t1

t1
#> # A tibble: 3 × 1
#>   a    
#>   <chr>
#> 1 " a "
#> 2 "b " 
#> 3 " c" 

t1 %>%
remove_whitespace()
#> # A tibble: 3 × 1
#>   a    
#>   <chr>
#> 1 a    
#> 2 b    
#> 3 c