2</span></span>
<span id="cb5-37"><a href="#cb5-37" tabindex="-1"></a><span class="co">#&gt; [2,]     3   3</span></span></code></pre></div>
</div>
</div>
<div id="subset-strings" class="section level1">
<h1>Subset strings</h1>
<div id="str_sub-extract-and-replace-substrings-from-a-character-vector" class="section level2">
<h2><code>str_sub()</code>: Extract and replace substrings from a
character vector</h2>
<p>What if we want to grab part of a string?</p>
<div class="sourceCode" id="cb6"><pre class="sourc