title: R: Error in UseMethod("tbl_vars")
body: <p>So I'm running the code below in R Studio and getting this error:</p>
  
  <blockquote>
    <p>Error in UseMethod("tbl_vars") : no applicable method for 'tbl_vars'
    applied to an object of class "character"</p>
  </blockquote>
  
  <p><strong>I don't know how to fix it cause there is no tbl_vars function! Can someone help?</strong></p>
  
  <pre><code>for (i in 1:ceiling(nrow(reviews)/batch)) {
      row_start &lt;- i*batch-batch+1
  
      row_end &lt;- ifelse(i*batch &lt; nrow(reviews), i*batch, nrow(reviews))
  
      print(paste("Processing row", row_start, "to row", row_end))
  
      reviews[row_start:row_end, ] %&gt;%
          unnest_tokens(word, text) -&gt; reviews_subset
  
      reviews_subset$row &lt;- 1:nrow(reviews_subset)
  
      reviews_subset %&gt;%
          anti_join(stopwords) %&gt;%
          arrange(row) -&gt; reviews_subset
  
      write_feather(reviews_subset, path = paste0("reviews", i, ".txt"))
  }
  </code></pre>
  
  <p>Ps: dplyr is installed. Also other installed packages: pacman, feather, data.table, devtools, tidyr, tidytext, tokenizers, tibble</p>
  
  <p>I'm using it to work with Yelp dataset.</p>
  
  <p>Thank you so much,
  Carmem</p>
  
  <p><strong>ps2: dataset example (edited and simplified to fit here):</strong></p>
  
  <pre><code>&gt; dput(as.data.frame(review))
  
  structure(list(user_id = 1:10, review_id = 11:20, business_id = 21:30, 
      stars = c(2L, 2L, 5L, 4L, 4L, 5L, 4L, 3L, 5L, 4L), text = c("Are you the type of person that requires being seen in an expensive, overly pretentious restaurant so that you can wear it as a status symbol?  Or maybe you're a gansta who dresses like CiLo Green and wants to show the hunny's (yes, a group of them out with one man) a night on the town!", 
      "Today was my first visit to the new luna, and I was disappointed-- both because I really liked the old cafe luna, and because the new luna came well recommended", 
      "Stayed here a few months ago and still remember the great service I received.", 
      "I came here for a business lunch from NYC and had a VERY appetizing meal. ", 
      "Incredible food with great flavor. ", 
      "OMG, y'all, try the Apple Pie Moonshine.  It. Is. Seriously. Good.  Smoooooooth.   The best rum that I've sampled so far: Zaya.", 
      "Caitlin is an amazing stylist.  She took time to hear what I had to say before jumping in", 
      "Oh yeah! After some difficulties in securing dinner, my dad and I found ourselves at one of the billion Primanti's locations for a quick feast", 
      "I've been going to this studio since the beginning of January", 
      "The best cannoli, hands down!!"
      )), .Names = c("user_id", "review_id", "business_id", "stars", 
  "text"), row.names = c(NA, -10L), class = "data.frame")
  </code></pre>