[R] How to apitalize leading letters & else of personal names?

RockO rock.ouimet at gmail.com
Wed Dec 15 03:00:03 CET 2010

Dear R world,

Do you know about a function that would capitalize in the correct manner
first and family names?
I found in the cwhmisc only the CapLeading function, but it just does not do
the job, taking care only to capitalize the first letter of a word.

I am looking for a function that would recognize " |'|Mc|-" and capitalize
the first letter following these characters.

An example:
names<-c("jean-francois st-john","helene o'donnel", "joe mcintyre")

Desired result:

>"Jean-Francois St-John" "Helene O'Donnel" "Joe McIntyre"



View this message in context: http://r.789695.n4.nabble.com/How-to-apitalize-leading-letters-else-of-personal-names-tp3088336p3088336.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list