title: Using pattern matching in R, how can I find if there are more than one matches per character string?
body: <p>I have the following vector:</p>
  <pre><code>vector1 &lt;- c(&quot;Frank frank&quot;, &quot;Frank&quot;, &quot;Fred&quot;, &quot;frank&quot;)
  </code></pre>
  <p>I wish to determine how many times the word <code>'Frank'</code> or <code>'frank'</code> appear in the vector. I want to count individual occurrences and keep track of how many times this pattern appears in each character string within the vector.</p>
  <p>The result should look like this:</p>
  <pre><code>2 1 0 1
  </code></pre>
  <p>Thanks!</p>