Dear R community,
Having performed a sentiment analysis on some papers, I got this dataframe, with sentiment scores at the sentence unit. I would like to sum these sentences to get article scores (accross element_ids).
Thank you very much in advance.
Etienne
sentiment_scores
element_id sentence_id word_count sentiment
1: 1 1 4 -0.25000000
2: 1 2 9 0.00000000
3: 1 3 37 -0.12329924
4: 1 4 48 0.04330127
5: 1 5 21 0.44734667
731: 28 9 18 0.16499158
732: 28 10 8 0.00000000
733: 28 11 7 0.09449112
734: 28 12 3 0.00000000
735: 28 13 16 0.12500000