Classify Polarity


I started a tutorial using the sentiment package & had to change to sentimentr as the aforementioned has been removed from the R repository.

In sentimentr what function / library would I use to give me the same result as classify_polarity would have if using sentiment ?

Code below for reference

# classify_polarity using the Naive_Bayes Algorithm  
class_pol = classify_polarity(emotions, algorithm ="bayes")
# get the polarity that gives best result
polarity = class_emo[,4]

Error received:
Error in classify_polarity(emotions, algorithm = "bayes") : 
  could not find function "classify_polarity"

Thanks in advance!

See tidytext and its free online book at

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.