powered by
The function trim removes unnecessary whitespaces from a character vector.
trim
trim(x)
character. The character vector at stake.
A character vector of the same length as x.
x
gsub.
gsub
# NOT RUN { trim(c(" a b", "Hello World ")) # }
Run the code above in your browser using DataLab