title: Match vectors on subset of digits in each element
body: <p>I am trying to see whether the elements in vector match with the first four digits of elements within a second vector (they are nested identifiers) and I'm not quite sure how to run the match. For example:</p>
  
  <pre><code>X     Y 
  1111  111120
  1111  890933
  2222  780777
  2222  222247
  </code></pre>
  
  <p>I would like to create code to tell me whether the first four digits of element i in vector y match the digits in element i in vector x. Extending the example, I hope to see:</p>
  
  <pre><code>True
  False
  False
  True
  </code></pre>
  
  <p>Thanks for any thoughts. </p>