Skip to content
Prev 258043 / 398502 Next

Tell the difference between characters

Hi Lisa,
On Tue, Apr 26, 2011 at 2:09 PM, Lisa <lisajca at gmail.com> wrote:
Is this what you're looking for?

testchar <- function(x)
{
substring(x, 1, 1) == substring(x, 2, 2)
}
[1] TRUE
[1] FALSE
aa    aA    ab
 TRUE FALSE FALSE