Hello, I want to detect Ab not Abc. For a normal vector test [1] "A" "Ab" "GG" "GA" "H" "Abc" "Gz" "HU"
> grep ("^Ab$", test) [1] 2 works well. For test.list [[1]] [1] "A" "Ab" "GG" "GA" [[2]] [1] "H" "Abc" "Gz" "HU" grep ("^Ab$", test.list) integer(0) doest not work. Why? How do I detect exclusively Ab in a list context? Thanks hermann > dput (test.list) list(c("A", "Ab", "GG", "GA"), c("H", "Abc", "Gz", "HU")) > dput (test) c("A", "Ab", "GG", "GA", "H", "Abc", "Gz", "HU") [[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.