ate the position of patterns in a
string</h2>
<p>Within each fruit, where does the first “p” occur? Where are all of
the “p”s?</p>
<div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" tabindex="-1"></a>fruit3 <span class="ot">&lt;-</span> <span class="fu">c</span>(<span class="st">&quot;papaya&quot;</span>, <span class="st">&quot;lime&quot;</span>, <span class="st">&quot;apple&quot;</span>)</span>
<span id="cb5-2"><a href="#cb5-2" ta