Vincent Thuilot Posted February 22, 2023 Share Posted February 22, 2023 Hello,I would like to use RSentiment package to analyze a text column on a table imported in an analysis.I'm mostly interested to use basic functions like calculate_total_presence_sentiment or calculate_score for every row.So far I managed to install the package, but the R commands I put aren't sufficient to make it work in a data function.Would you have an example of an RSentiment script that I could use in a data function?Thanks in advance! Link to comment Share on other sites More sharing options...
Vincent Thuilot Posted February 22, 2023 Author Share Posted February 22, 2023 I tried thislibrary(RSentiment)text_column<-table1$column1sentiment_scores<-lapply(column1,calculate_sentiment)sentiment_df<-do.call(rbind, sentiment_scores)merged_data<-cbind(table1, sentimentdf$outcome2)and thisfor (row in table1) { Output1=calculate_score(c("data1"))}but no luck so far, see error attached.if you have any idea, please go ahead! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now