i am very new to sentiment analysis. I am running the codes based on the tutorial here
It is using a tidytext package. But I encountered the problem when I run the code
AFINN <- sentiments %>%
filter(lexicon == "AFINN") %>%
select(word, afinn_score = score)
AFINN
The error is as below
Error: Problem with `filter()` input `..1`.
✖ object 'lexicon' not found
ℹ Input `..1` is `lexicon == "AFINN"`.
I guess it is because the lexicon column is not in the sentiments dataframe. Or is the tidytext package changed so that i could not run the code the way that the tutorial ran it? is there any other way to correct the code or run another similar code?
Thank you in advance for your clarification.