[R] String manipulation---mixed case
damian.betebenner at bc.edu
Sun Dec 5 16:21:46 CET 2004
Does anyone know of a "slick" way to get R to convert a string which is all upper case to a string where the first letter in each word is upper case and all others are lower case?
I suspect the solution is to begin by parsing the string, convert the appropriate letters to upper and lower case using "toupper" and "tolower", and then to paste the pieces back together. Moreover, given the elegance and power of R, I'll bet this can be coded very tersely. Before I embarked on trying to code this, I thought I would tap the R braintrust to see if this has already been done.
Any help greatly appreciated,
Educational Research, Measurement & Evaluation
Lynch School of Education
Chestnut Hill, MA 02467
(617) 552 4491
More information about the R-help