This is a follow-up question from here: Subsetting a string based on pre- and suffix
When you have this command:
d <- subset(b, b$X %in% test)
This command look for all in b$X
that exactly matches test. How can I manipulate it to say its enough that the values in b$X
contains test
?
I.e. if b$X
has a value "something"
and test
has "thing"
. Then I would regard this as a match.
Important update! Test has 512 values, not only 1 as in the example.