Dear Any, Is there a fonction in R to change a string to uppercase ? Thanks for all your help
The following function will do it. But be warned it will only work if all the input strings are lower case. Make.To.Upper.Case<-function(my.string){ paste(LETTERS[match(strsplit(my.string,"")[[1]],letters)],collapse="") } Make.To.Upper.Case("jhjhaskjdakdsj")> [1] "JHJHASKJDAKDSJ"-----Original Message----- From: pbrouilly@gphy.campus.univ-poitiers.fr [mailto:pbrouilly@gphy.campus.univ-poitiers.fr] Sent: 22 September 2004 09:43 To: r-help@stat.math.ethz.ch Subject: [R] Dear Any, Is there a fonction in R to change a string to uppercase ? Thanks for all your help ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html KSS Ltd Seventh Floor St James's Buildings 79 Oxford Street Manchester M1 6SS England Company Registration Number 2800886 Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305 mailto:kssg@kssg.com http://www.kssg.com The information in this Internet email is confidential and m...{{dropped}}
?toupper p.s: By default, generally everything on this list *is* regarding R; hence it would be nice to see a more imaginative subject line. -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of pbrouilly at gphy.campus.univ-poitiers.fr Sent: Wednesday, September 22, 2004 5:43 PM To: r-help at stat.math.ethz.ch Subject: [R] Dear Any, Is there a fonction in R to change a string to uppercase ? Thanks for all your help ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
pbrouilly at gphy.campus.univ-poitiers.fr wrote:> Dear Any, > > Is there a fonction in R to change a string to uppercase ? > > Thanks for all your help > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htmlPlease read the posting guide and learn a) to use a sensible subject line b) to use R's help facilities You are looking for ?toupper Uwe Ligges
help.search("upper") "chartr(base) Character Translation and Casefolding" ?chartr refers to the function toupper() Best wishes, Arne On Wednesday 22 September 2004 10:43, pbrouilly at gphy.campus.univ-poitiers.fr wrote:> Dear Any, > > Is there a fonction in R to change a string to uppercase ? > > Thanks for all your help > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html-- Arne Henningsen Department of Agricultural Economics University of Kiel Olshausenstr. 40 D-24098 Kiel (Germany) Tel: +49-431-880 4445 Fax: +49-431-880 1397 ahenningsen at agric-econ.uni-kiel.de http://www.uni-kiel.de/agrarpol/ahenningsen/
On Wed, Sep 22, 2004 at 10:43:18AM +0200 - a wonderful day - pbrouilly at gphy.campus.univ-poitiers.fr wrote:> Is there a fonction in R to change a string to uppercase ?toupper() hint: basic functionality is in package base ;) which is easy to investigate in html-help -> packages in my installation second entry from top of list ... All the best, Stefan. -- .o. e-mail: stefan at drees.name, web: www.sdrees.org, +49 700 SDREESDE ..o fingerprint = 516C C4EF 712A B26F 15C9 C7B7 5651 6964 D508 1B56 ooo stefan drees - consulting and lecturing - problems to tasks