title: Error in stri_detect_regex in R
body: <p>I am receiving this error</p>
  
  <blockquote>
    <p>Error in stri_detect_regex(string, pattern, opts_regex = opts(pattern)) : 
      Incorrectly nested parentheses in regexp pattern. (U_REGEX_MISMATCHED_PAREN) </p>
  </blockquote>
  
  <p>when I run the code</p>
  
  <pre><code>  # find occurrences of initial dataframe
    named_RN$search &lt;- map_int(named_RN$V1, function(x){sum(str_detect(final_RN$named_RN, pattern = x))})
  </code></pre>
  
  <p>in which <code>named_RN$V1</code> looks like</p>
  
  <pre><code>aldosterone
  renin
  potassium
  calcitrol
  </code></pre>
  
  <p>and <code>final_RN$named_RN</code> looks like</p>
  
  <pre><code>aldosterone, creatinine 
  human, warfarin
  aspirin, renin, calcitrol
  magnesium, calcitrol
  </code></pre>
  
  <p>and my code aims to create a new variable within <code>named_RN</code> that shows the raw counts of each phrase, so that <code>named_RN</code> looks like</p>
  
  <pre><code>V1              search
  aldosterone     1
  renin           0
  potassium       0
  calcitrol       2
  </code></pre>
  
  <p>Please advise. Thanks.</p>