How do you trim leading and trailing whitespaces in R?
a) strip()
b) trim()
c) trimws()
d) stripws()
Answer:
c) trimws()
Explanation:
The trimws()
function removes leading and trailing whitespaces from a string in R.
The trimws()
function removes leading and trailing whitespaces from a string in R.