Description Usage Arguments Value
This function takes integer Yelp star ratings and "flattens" them into binary positive/negative factor ratings. 1- and 2-star ratings become NEG, 4- and 5-star ratings become POS, and 3-star ratings are discarded.
1 |
data |
A tibble with Yelp reviews. |
var |
The column containing star ratings as numeric values between 1 and 5. |
A modified tibble without 3-star ratings, and with a new column containing "POS" for 4- and 5-star ratings and "NEG" for 1- and 2-star ratings.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.