[R] removing blanks from a string

juli pausas pausas at gmail.com
Fri Jun 27 10:34:58 CEST 2008


Hi
Is there a way to remove blank characters from the end of strings in a
vector? Something like the =TRIM functions of the OpenOffice
spreadsheet. E.g.,
a <- c("hola    ", "Yes ", "hello           ")    # I'd like to get:
c("hola", "Yes", "hello")

Thanks

Juli


--
http://www.ceam.es/pausas



More information about the R-help mailing list