he stringr documentation and here they are contrasted with the
analogous base R operations.</p>
</div>
<div id="detect-matches" class="section level1">
<h1>Detect matches</h1>
<div id="str_detect-detect-the-presence-or-absence-of-a-pattern-in-a-string" class="section level2">
<h2><code>str_detect()</code>: Detect the presence or absence of a
pattern in a string</h2>
<p>Suppose you want to know whether each word in a vector of fruit names
contains an “a”.</p>
<div class="sourceCode" id="cb2"><pre class="