Skip to content
Prev 130985 / 398506 Next

compare strings

Peter Dalgaard wrote:
Oups. Two lines fell out. I meant:

 > y <- factor(c("b","c","b"))
 > x <- factor(c("a","b","b"))
 > d <- as.character(x)==as.character(y)
 > table(d)
d
FALSE  TRUE
    2     1
 > which(!d)
[1] 1 2