powered by
A function to remove leading/trailing whitespace
sf_trim(subject, which = c("both", "left", "right"), whitespace = "[ \\t\\r\\n]", ...)
A stringfish vector of trimmed whitespace
A character vector
"both", "left", or "right" determines which white space is removed
Whitespace characters (default: "[ \\t\\r\\n]")
Parameters passed to sf_gsub
trimws
if(getRversion() >= "3.5.0") { x <- c(" alpha ", " beta", " gamma ", "delta ", "epsilon ") sf_trim(x) }
Run the code above in your browser using DataLab