[R] How to change letters after space into capital letters

Wolfram Fischer wolfram at fischer-zim.ch
Mon Apr 11 12:22:12 CEST 2005


What is the easiest way to change within vector of strings
each letter after a space into a capital letter?

E.g.:
  c( "this is an element of the vector of strings", "second element" )
becomes:
  c( "This Is An Element Of The Vector Of Strings", "Second Element" )

My reason to try to do this is to get more readable abbreviations.
(A suggestion would be to add an option to abbreviate() which changes
letters after space to uppercase letters before executing the abbreviation
algorithm.)

Thanks - Wolfram




More information about the R-help mailing list