Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text class.negative class.positive class.trust
- <fctr> <dbl> <dbl> <dbl>
- firmly believe... 11 24 3
- when i thought... 3 3 4
- fans of david... 11 24 12
- just watched... 3 5 9
- i was so looking... 16 9 10
- clean.reviews = data.frame(text = reviews,class = get_nrc_sentiment(reviews), stringsAsFactors = T)
- head(clean.reviews)
- clean.reviews1 = as.data.frame(clean.reviews)
- head(clean.reviews1)
- class (class.positive-class.negative) text
- 13 firmly believe...
- 0 when I thought...
- 13 fans of david...
- 2 just watched...
- -7 i was so looking...
- library(dplyr)
- clean.reviews %>% mutate(class = class.positive - class.negative)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement