Hi,
May be this helps:
mapply(grep,'^Ab$',test.list)
#or
lapply(test.list,function(x) grep("^Ab$",x))
A.K.
On Sunday, January 12, 2014 9:31 PM, Hermann Norpois wrote:
Hello,
I want to detect Ab not Abc. For a normal vector
test
[1] "A" "Ab" "GG" "GA" "H" "Abc" "Gz" "HU"
> grep ("
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
2 matches
Mail list logo