Cleaning categorical variable descriptions before presenting.
Arguments
- x
(character
)
vector with categories descriptions.
Examples
clean_description("Level A (other text)")
#> [1] "Level A"
clean_description("A long string that should be shortened")
#> [1] "A long string tha..."