Example case Suppose you have a bunch of really filthy names, which makes you puke… You can go about fixing those with the help of stringi and stringr
Lets say following character vector hosts those filthy names.
filthy <- c("Grains %", "Moisture (gm/kg)", "Plant height (cm)", "White spaces", "White space (filth%)") filthy ## [1] "Grains %" "Moisture (gm/kg)" "Plant height (cm)" ## [4] "White spaces" "White space (filth%)" Now to get rid of the filth use string manipulation.
Last updated on
2020-05-26
1 min read
R, tidyverse