[R] Tell the difference between characters
wwwhsd at gmail.com
Tue Apr 26 22:00:07 CEST 2011
sapply(apply(sapply(temp, charToRaw), 2, unique), length) == 1
On Tue, Apr 26, 2011 at 3:09 PM, Lisa <lisajca at gmail.com> wrote:
> Dear all,
> I just want to determine if the characters in a character string are the
> same or not. For example,
> temp <- c("aa", "aA", "ab")
> How do I determine the first one have the two same “a”, and the second and
> third have the different characters? Thanks in advance.
> View this message in context: http://r.789695.n4.nabble.com/Tell-the-difference-between-characters-tp3476130p3476130.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
25° 25' 40" S 49° 16' 22" O
More information about the R-help