title: Is there a way to return all tweets matching an element in a created vector?
body: <p>I have a dataset where one variable is text from tweets (text). I want to detect all tweets matching at least one element in my vector (Ukr_words_MIX). Here is what I tried to do, using::rtweet, string_detect and apply</p>
  <p><strong>input</strong></p>
  <pre><code>con_ukr_words_NOR &lt;- df_A_NOR %&gt;%
   mutate(text = tolower(text),
   lapply(x = Ukr_words_MIX, function(x){
   str_detect(string = text, pattern = x)})
  </code></pre>
  <p><strong>output</strong></p>
  <pre><code>&gt; con_ukr_words_NOR &lt;- df_A_NOR%&gt;%
  +   mutate(text = tolower(text),
  +   lapply(x = Ukr_words_MIX, function(x){
  +   str_detect(string = text, pattern = x)})
  + View(df_A)
  Error: unexpected symbol in:
  &quot;  str_detect(string = text, pattern = x)})
  </code></pre>
  <p>Any ideas about what I am doing wrong?</p>
  <p>Thank you!</p>