title: Subset not based on exact match, but partial in R
body: <p>This is a follow-up question from here:
  <a href="https://stackoverflow.com/questions/21407361/subsetting-a-string-based-on-pre-and-suffix">Subsetting a string based on pre- and suffix</a></p>
  
  <p>When you have this command:  </p>
  
  <pre><code>    d &lt;- subset(b, b$X %in% test)  
  </code></pre>
  
  <p>This command look for all in <code>b$X</code> that exactly matches test. How can I manipulate it to say its enough that the values in <code>b$X</code> contains <code>test</code>?<br>
  I.e. if <code>b$X</code> has a value <code>"something"</code> and <code>test</code> has <code>"thing"</code>. Then I would regard this as a match.</p>
  
  <p>Important update! Test has 512 values, not only 1 as in the example.</p>