I am trying to use grep to test whether a vector of strings are present in an another vector or not, and to output the values that are present (the matching pat
grep
Not sure whether this answer has already appeared...
For the particular pattern in the question, you can just do it with a single grep() call,
grep()
grep("A[169]", myfile$Letter)