Calculate Text Polarity Sentiment
Overview
Calculate text polarity sentiment at the sentence level and optionally aggregate by rows or grouping variable(s).
Install
Health
NOTER code for possible problemsr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64
Found calls to structure() using deprecated special names: sentimentr/R/validate_sentiment.R (.Dim: 2, .Dimnames: 2, .Names: 2) '.Dim' should be changed to 'dim'. '.Dimnames' should be changed to 'dimnames'. '.Names' should be changed to 'names'.
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Tyler Rinker <tyler.rinker@gmail.com>’ Package CITATION file contains call(s) to old-style citEntry(). Please use bibentry() instead.
- NOTE8 OK, 5 NOTENow
- NOTE11 OK, 2 NOTE2026-06-09
- ERROR11 OK, 1 NOTE, 1 ERROR2026-06-08
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 50 (1 internal)includes a package overview page
- Examples that run
- 63%12 run in a plain check · 7 never run
- Exported functions with examples
- 90%
- Documented parameters
- 88%
- Return-value docs
- 90%
- Help pages citing references
- 40%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 26
- Median days to close, 50 most recently updated closed PRs
- 24
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
3 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/trinker/sentimentr on 2026-10-18.
Dependencies
Installing sentimentr adds 41 packages (19 with compiled code, 43 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 2.9.0Latest
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- 2.7.1
- 2.6.12018-10-20 · diff ↗ ·
added 5 exports
available_data, extract_profanity_terms, profanity, profanity_by, sentimentr_data - 2.4.22018-09-25 · diff ↗
- 2.3.22018-04-24 · diff ↗
- RR 3.5.0 released · 2018-04-23
- 2.2.32018-01-16 · diff ↗ ·
added 5 exports
combine_data, replace_emoji, replace_emoji_identifier, replace_internet_slang, replace_word_elongation - 2.0.12017-11-27 · diff ↗
Show 5 earlier eventsHide 5 earlier events
- RR 3.4.0 released · 2017-04-21
- 1.0.02017-03-11 · diff ↗ ·
added 8 exports
average_downweighted_zero, average_mean, average_weighted_mixed_sentiment, general_rescale, sentiment_attributes, update_polarity_table, update_valence_shifter_table, validate_sentiment - 0.4.0
- 0.2.32016-08-19
- RR 3.3.0 released · 2016-05-03
Package metadata
- First published
- 2016-08-19
- Total releases
- 10 / 10 yrs
- License
- MIT + file LICENSE OSI · relicensed from GPL-2 in 0.4.0
- Minimum R
- ≥ 3.4.0
- Bundled data
- 2.5 MB / 18 files
- Download size
- 3.7 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("sentimentr")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.