[R] Extract upper case letters

Rui Barradas ruipbarradas at sapo.pt
Thu Jun 28 09:23:18 CEST 2012


Hello,

Try the following.


txt <- "TheWeatherIsVeryNice"
Up <- strsplit(txt, "[[:lower:]]*")
Up[Up != ""]


Hope this helps,

Rui Barradas

Em 27-06-2012 20:15, mdvaan escreveu:
> t <- "TheWeatherIsVeryNice"
>
> How do I extract the upper case letters? - TWIVN
>
> Thanks!
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Extract-upper-case-letters-tp4634664.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list