I am trying to do Sentiment Analysis in R by extracting the Tweets. Tweets are getting extracted fine. But getting this error when I try to Tokenize the tweets. Error I get is
"Error in mutate_impl(.data, dots) : Evaluation error: object 'negative' not found.".
This is the code I have written
tokens %>%
inner_join(get_sentiments("bing")) %>% # pull out only sentiment words
count(sentiment) %>% # count the # of positive & negative words
spread(sentiment, n, fill = 0) %>%
mutate(sentiment = positive - negative)
This error is getting thrown once I include the Mutate statement. Appreciate any help I can get in resolving this please.