Hi Antonio, how about this: txt2 <- "useRs may fly into JFK or laGuardia" chartr("a-zA-Z", "A-Za-z", txt2)
Cheers. Am 05.12.2011 08:11, schrieb Tonio: > Hello R-help list, > > I am looking for way to toggle the case of the characters like a flip-flop; > that is from ''Hello'' to "hELLO" or vice versa. > > I know that there are a number of functions like casefold, tolower, toupper, > etc. but these functions change the case in an uniform way. > > Thanks in advance, > > Antonio Rivero Ostoic > > > > > Antonio Rivero Ostoic > PhD Student, Department of Leadership and Strategy > From 1 Jul until 31 Dec 2011 > Tel. +61 3 8344 4300 > Fax +61 3 9347 6618 > Email j...@sdu.dk > Addr. The University of Melbourne, Victoria 3010 Australia > ------------------------------------------------------------- > UNIVERSITY OF SOUTHERN DENMARK > Sdr. Stationsvej 28 · DK-4200 Slagelse · Denmark · Tel. +45 6550 1000 · > www.sdu.dk > > [[alternative HTML version deleted]] > > > > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. -- Eik Vettorazzi Department of Medical Biometry and Epidemiology University Medical Center Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/7410-58243 F ++49/40/7410-57790 -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.