こっちのほうがいいかも
> unique(c(sapply(pattern, function(x) grep(x, target, value=TRUE))))
[1] "abaa" "abef" "aefe"