CRAN Package Check Results for Package sentimentr

Last updated on 2025-12-19 23:50:03 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2.9.0 8.12 76.12 84.24 NOTE
r-devel-linux-x86_64-debian-gcc 2.9.0 6.34 40.27 46.61 ERROR
r-devel-linux-x86_64-fedora-clang 2.9.0 15.00 89.43 104.43 ERROR
r-devel-linux-x86_64-fedora-gcc 2.9.0 13.00 79.40 92.40 ERROR
r-devel-windows-x86_64 2.9.0 10.00 96.00 106.00 OK
r-patched-linux-x86_64 2.9.0 8.47 65.37 73.84 OK
r-release-linux-x86_64 2.9.0 7.81 65.60 73.41 OK
r-release-macos-arm64 2.9.0 OK
r-release-macos-x86_64 2.9.0 6.00 57.00 63.00 OK
r-release-windows-x86_64 2.9.0 10.00 94.00 104.00 OK
r-oldrel-macos-arm64 2.9.0 OK
r-oldrel-macos-x86_64 2.9.0 7.00 45.00 52.00 OK
r-oldrel-windows-x86_64 2.9.0 15.00 117.00 132.00 OK

Check Details

Version: 2.9.0
Check: CRAN incoming feasibility
Result: NOTE Maintainer: ‘Tyler Rinker <tyler.rinker@gmail.com>’ Package CITATION file contains call(s) to old-style citEntry(). Please use bibentry() instead. Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc

Version: 2.9.0
Check: examples
Result: ERROR Running examples in ‘sentimentr-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: emotion > ### Title: Compute Emotion Rate > ### Aliases: emotion > > ### ** Examples > > mytext <- c( + "I am not afraid of you", + NA, + "", + "I love it [not really]", + "I'm not angry with you", + "I hate it when you lie to me. It's so humiliating", + "I'm not happpy anymore. It's time to end it", + "She's a darn good friend to me", + "I went to the terrible store", + "There is hate and love in each of us", + "I'm no longer angry! I'm really experiencing peace but not true joy.", + + paste("Out of the night that covers me, Black as the Pit from pole to", + "pole, I thank whatever gods may be For my unconquerable soul." + ), + paste("In the fell clutch of circumstance I have not winced nor cried", + "aloud. Under the bludgeonings of chance My head is bloody, but unbowed." + ), + paste("Beyond this place of wrath and tears Looms but the Horror of the", + "shade, And yet the menace of the years Finds, and shall find, me unafraid." + ), + paste("It matters not how strait the gate, How charged with punishments", + "the scroll, I am the master of my fate: I am the captain of my soul." + ) + + ) > > ## works on a character vector but not the preferred method avoiding the > ## repeated cost of doing sentence boundary disambiguation every time > ## `emotion` is run > emotion(mytext) Error in `[.data.table`(tidied[, list(token = stringi::stri_replace_all_regex(unlist(token), : attempt access index 4/4 in VECTOR_ELT Calls: emotion ... emotion.get_sentences_character -> [ -> [.data.table Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 2.9.0
Check: tests
Result: ERROR Running ‘testthat.R’ [3s/3s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library("testthat") > library("sentimentr") > > test_check("sentimentr") Saving _problems/test-extract_sentiment_terms-8.R Saving _problems/test-get_sentences-33.R Saving _problems/test-highlight-5.R Saving _problems/test-sentiment-10.R Saving _problems/test-sentiment-25.R Saving _problems/test-sentiment-40.R Saving _problems/test-sentiment-53.R Saving _problems/test-sentiment-68.R Saving _problems/test-sentiment_by-11.R Saving _problems/test-sentiment_by-18.R Saving _problems/test-sentiment_by-30.R Saving _problems/test-uncombine-11.R [ FAIL 12 | WARN 0 | SKIP 0 | PASS 16 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-extract_sentiment_terms.R:8:5'): extract_sentiment_terms extracts the terms ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::extract_sentiment_terms(x) at test-extract_sentiment_terms.R:8:5 2. └─sentimentr:::extract_sentiment_terms.get_sentences_character(x) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-get_sentences.R:33:5'): get_sentences works on sentment/sentiment_by ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment_by(mytext, question.weight = 0) at test-get_sentences.R:33:5 2. └─sentimentr:::sentiment_by.get_sentences_character(mytext, question.weight = 0) 3. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 4. │ └─base::withCallingHandlers(...) 5. ├─sentimentr::sentiment(text.var = text.var, ...) 6. └─sentimentr:::sentiment.get_sentences_character(...) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) ── Error ('test-highlight.R:5:5'): highlight produces an HTML file ───────────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment_by(...) at test-highlight.R:5:5 2. └─sentimentr:::sentiment_by.get_sentences_character(...) 3. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 4. │ └─base::withCallingHandlers(...) 5. ├─sentimentr::sentiment(text.var = text.var, ...) 6. └─sentimentr:::sentiment.get_sentences_character(...) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:10:5'): sentiment produces a data.table with numeric sentiment column ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(sentiment(mytext), "data.table")) at test-sentiment.R:10:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(sentiment(mytext), "data.table") 5. ├─sentimentr::sentiment(mytext) 6. └─sentimentr:::sentiment.get_sentences_character(mytext) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:25:5'): sentiment question.weight = 0 alters the output ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment(mytext) at test-sentiment.R:25:5 2. └─sentimentr:::sentiment.get_sentences_character(mytext) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:40:5'): sentiment n.before/n.after alters the output ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment(mytext) at test-sentiment.R:40:5 2. └─sentimentr:::sentiment.get_sentences_character(mytext) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:53:5'): sentiment adversative.weight = 0 alters the output ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment(mytext) at test-sentiment.R:53:5 2. └─sentimentr:::sentiment.get_sentences_character(mytext) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:68:5'): sentiment_by plots a ggplot object ───────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(plot(sentiment(mytext)), "ggplot")) at test-sentiment.R:68:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(plot(sentiment(mytext)), "ggplot") 5. ├─base::plot(sentiment(mytext)) 6. ├─sentimentr::sentiment(mytext) 7. └─sentimentr:::sentiment.get_sentences_character(mytext) 8. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 9. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 10. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment_by.R:11:5'): sentiment_by gives combined elements when `by = NULL` ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(sentiment_by(mytext), "data.table")) at test-sentiment_by.R:11:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(sentiment_by(mytext), "data.table") 5. ├─sentimentr::sentiment_by(mytext) 6. └─sentimentr:::sentiment_by.get_sentences_character(mytext) 7. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 8. │ └─base::withCallingHandlers(...) 9. ├─sentimentr::sentiment(text.var = text.var, ...) 10. └─sentimentr:::sentiment.get_sentences_character(...) 11. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 12. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 13. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment_by.R:18:5'): sentiment_by gives combined group when `by` is given ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─base::with(...) at test-sentiment_by.R:18:5 2. └─base::with.default(...) 3. └─base::eval(substitute(expr), data, enclos = parent.frame()) 4. └─base::eval(substitute(expr), data, enclos = parent.frame()) 5. ├─sentimentr::sentiment_by(...) 6. └─sentimentr:::sentiment_by.get_sentences_character(...) 7. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 8. │ └─base::withCallingHandlers(...) 9. ├─sentimentr::sentiment(text.var = text.var, ...) 10. └─sentimentr:::sentiment.get_sentences_character(...) 11. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 12. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 13. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment_by.R:30:5'): sentiment_by plots a ggplot object ────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(plot(sentiment_by(mytext)), "ggplot")) at test-sentiment_by.R:30:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(plot(sentiment_by(mytext)), "ggplot") 5. ├─base::plot(sentiment_by(mytext)) 6. ├─sentimentr::sentiment_by(mytext) 7. └─sentimentr:::sentiment_by.get_sentences_character(mytext) 8. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 9. │ └─base::withCallingHandlers(...) 10. ├─sentimentr::sentiment(text.var = text.var, ...) 11. └─sentimentr:::sentiment.get_sentences_character(...) 12. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 13. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 14. └─data.table:::`[.data.table`(...) ── Error ('test-uncombine.R:11:5'): uncombine ... ────────────────────────────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment_by(mytext) at test-uncombine.R:11:5 2. └─sentimentr:::sentiment_by.get_sentences_character(mytext) 3. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 4. │ └─base::withCallingHandlers(...) 5. ├─sentimentr::sentiment(text.var = text.var, ...) 6. └─sentimentr:::sentiment.get_sentences_character(...) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) [ FAIL 12 | WARN 0 | SKIP 0 | PASS 16 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 2.9.0
Check: examples
Result: ERROR Running examples in ‘sentimentr-Ex.R’ failed The error most likely occurred in: > ### Name: emotion > ### Title: Compute Emotion Rate > ### Aliases: emotion > > ### ** Examples > > mytext <- c( + "I am not afraid of you", + NA, + "", + "I love it [not really]", + "I'm not angry with you", + "I hate it when you lie to me. It's so humiliating", + "I'm not happpy anymore. It's time to end it", + "She's a darn good friend to me", + "I went to the terrible store", + "There is hate and love in each of us", + "I'm no longer angry! I'm really experiencing peace but not true joy.", + + paste("Out of the night that covers me, Black as the Pit from pole to", + "pole, I thank whatever gods may be For my unconquerable soul." + ), + paste("In the fell clutch of circumstance I have not winced nor cried", + "aloud. Under the bludgeonings of chance My head is bloody, but unbowed." + ), + paste("Beyond this place of wrath and tears Looms but the Horror of the", + "shade, And yet the menace of the years Finds, and shall find, me unafraid." + ), + paste("It matters not how strait the gate, How charged with punishments", + "the scroll, I am the master of my fate: I am the captain of my soul." + ) + + ) > > ## works on a character vector but not the preferred method avoiding the > ## repeated cost of doing sentence boundary disambiguation every time > ## `emotion` is run > emotion(mytext) Error in `[.data.table`(tidied[, list(token = stringi::stri_replace_all_regex(unlist(token), : attempt access index 4/4 in VECTOR_ELT Calls: emotion ... emotion.get_sentences_character -> [ -> [.data.table Execution halted Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 2.9.0
Check: tests
Result: ERROR Running ‘testthat.R’ [7s/12s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library("testthat") > library("sentimentr") > > test_check("sentimentr") Saving _problems/test-extract_sentiment_terms-8.R Saving _problems/test-get_sentences-33.R Saving _problems/test-highlight-5.R Saving _problems/test-sentiment-10.R Saving _problems/test-sentiment-25.R Saving _problems/test-sentiment-40.R Saving _problems/test-sentiment-53.R Saving _problems/test-sentiment-68.R Saving _problems/test-sentiment_by-11.R Saving _problems/test-sentiment_by-18.R Saving _problems/test-sentiment_by-30.R Saving _problems/test-uncombine-11.R [ FAIL 12 | WARN 0 | SKIP 0 | PASS 16 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-extract_sentiment_terms.R:8:5'): extract_sentiment_terms extracts the terms ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::extract_sentiment_terms(x) at test-extract_sentiment_terms.R:8:5 2. └─sentimentr:::extract_sentiment_terms.get_sentences_character(x) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-get_sentences.R:33:5'): get_sentences works on sentment/sentiment_by ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment_by(mytext, question.weight = 0) at test-get_sentences.R:33:5 2. └─sentimentr:::sentiment_by.get_sentences_character(mytext, question.weight = 0) 3. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 4. │ └─base::withCallingHandlers(...) 5. ├─sentimentr::sentiment(text.var = text.var, ...) 6. └─sentimentr:::sentiment.get_sentences_character(...) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) ── Error ('test-highlight.R:5:5'): highlight produces an HTML file ───────────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment_by(...) at test-highlight.R:5:5 2. └─sentimentr:::sentiment_by.get_sentences_character(...) 3. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 4. │ └─base::withCallingHandlers(...) 5. ├─sentimentr::sentiment(text.var = text.var, ...) 6. └─sentimentr:::sentiment.get_sentences_character(...) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:10:5'): sentiment produces a data.table with numeric sentiment column ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(sentiment(mytext), "data.table")) at test-sentiment.R:10:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(sentiment(mytext), "data.table") 5. ├─sentimentr::sentiment(mytext) 6. └─sentimentr:::sentiment.get_sentences_character(mytext) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:25:5'): sentiment question.weight = 0 alters the output ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment(mytext) at test-sentiment.R:25:5 2. └─sentimentr:::sentiment.get_sentences_character(mytext) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:40:5'): sentiment n.before/n.after alters the output ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment(mytext) at test-sentiment.R:40:5 2. └─sentimentr:::sentiment.get_sentences_character(mytext) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:53:5'): sentiment adversative.weight = 0 alters the output ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment(mytext) at test-sentiment.R:53:5 2. └─sentimentr:::sentiment.get_sentences_character(mytext) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:68:5'): sentiment_by plots a ggplot object ───────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(plot(sentiment(mytext)), "ggplot")) at test-sentiment.R:68:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(plot(sentiment(mytext)), "ggplot") 5. ├─base::plot(sentiment(mytext)) 6. ├─sentimentr::sentiment(mytext) 7. └─sentimentr:::sentiment.get_sentences_character(mytext) 8. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 9. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 10. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment_by.R:11:5'): sentiment_by gives combined elements when `by = NULL` ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(sentiment_by(mytext), "data.table")) at test-sentiment_by.R:11:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(sentiment_by(mytext), "data.table") 5. ├─sentimentr::sentiment_by(mytext) 6. └─sentimentr:::sentiment_by.get_sentences_character(mytext) 7. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 8. │ └─base::withCallingHandlers(...) 9. ├─sentimentr::sentiment(text.var = text.var, ...) 10. └─sentimentr:::sentiment.get_sentences_character(...) 11. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 12. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 13. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment_by.R:18:5'): sentiment_by gives combined group when `by` is given ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─base::with(...) at test-sentiment_by.R:18:5 2. └─base::with.default(...) 3. └─base::eval(substitute(expr), data, enclos = parent.frame()) 4. └─base::eval(substitute(expr), data, enclos = parent.frame()) 5. ├─sentimentr::sentiment_by(...) 6. └─sentimentr:::sentiment_by.get_sentences_character(...) 7. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 8. │ └─base::withCallingHandlers(...) 9. ├─sentimentr::sentiment(text.var = text.var, ...) 10. └─sentimentr:::sentiment.get_sentences_character(...) 11. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 12. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 13. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment_by.R:30:5'): sentiment_by plots a ggplot object ────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(plot(sentiment_by(mytext)), "ggplot")) at test-sentiment_by.R:30:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(plot(sentiment_by(mytext)), "ggplot") 5. ├─base::plot(sentiment_by(mytext)) 6. ├─sentimentr::sentiment_by(mytext) 7. └─sentimentr:::sentiment_by.get_sentences_character(mytext) 8. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 9. │ └─base::withCallingHandlers(...) 10. ├─sentimentr::sentiment(text.var = text.var, ...) 11. └─sentimentr:::sentiment.get_sentences_character(...) 12. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 13. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 14. └─data.table:::`[.data.table`(...) ── Error ('test-uncombine.R:11:5'): uncombine ... ────────────────────────────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment_by(mytext) at test-uncombine.R:11:5 2. └─sentimentr:::sentiment_by.get_sentences_character(mytext) 3. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 4. │ └─base::withCallingHandlers(...) 5. ├─sentimentr::sentiment(text.var = text.var, ...) 6. └─sentimentr:::sentiment.get_sentences_character(...) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) [ FAIL 12 | WARN 0 | SKIP 0 | PASS 16 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-fedora-clang

Version: 2.9.0
Check: tests
Result: ERROR Running ‘testthat.R’ Running the tests in ‘tests/testthat.R’ failed. Complete output: > library("testthat") > library("sentimentr") > > test_check("sentimentr") Saving _problems/test-extract_sentiment_terms-8.R Saving _problems/test-get_sentences-33.R Saving _problems/test-highlight-5.R Saving _problems/test-sentiment-10.R Saving _problems/test-sentiment-25.R Saving _problems/test-sentiment-40.R Saving _problems/test-sentiment-53.R Saving _problems/test-sentiment-68.R Saving _problems/test-sentiment_by-11.R Saving _problems/test-sentiment_by-18.R Saving _problems/test-sentiment_by-30.R Saving _problems/test-uncombine-11.R [ FAIL 12 | WARN 0 | SKIP 0 | PASS 16 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-extract_sentiment_terms.R:8:5'): extract_sentiment_terms extracts the terms ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::extract_sentiment_terms(x) at test-extract_sentiment_terms.R:8:5 2. └─sentimentr:::extract_sentiment_terms.get_sentences_character(x) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-get_sentences.R:33:5'): get_sentences works on sentment/sentiment_by ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment_by(mytext, question.weight = 0) at test-get_sentences.R:33:5 2. └─sentimentr:::sentiment_by.get_sentences_character(mytext, question.weight = 0) 3. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 4. │ └─base::withCallingHandlers(...) 5. ├─sentimentr::sentiment(text.var = text.var, ...) 6. └─sentimentr:::sentiment.get_sentences_character(...) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) ── Error ('test-highlight.R:5:5'): highlight produces an HTML file ───────────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment_by(...) at test-highlight.R:5:5 2. └─sentimentr:::sentiment_by.get_sentences_character(...) 3. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 4. │ └─base::withCallingHandlers(...) 5. ├─sentimentr::sentiment(text.var = text.var, ...) 6. └─sentimentr:::sentiment.get_sentences_character(...) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:10:5'): sentiment produces a data.table with numeric sentiment column ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(sentiment(mytext), "data.table")) at test-sentiment.R:10:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(sentiment(mytext), "data.table") 5. ├─sentimentr::sentiment(mytext) 6. └─sentimentr:::sentiment.get_sentences_character(mytext) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:25:5'): sentiment question.weight = 0 alters the output ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment(mytext) at test-sentiment.R:25:5 2. └─sentimentr:::sentiment.get_sentences_character(mytext) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:40:5'): sentiment n.before/n.after alters the output ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment(mytext) at test-sentiment.R:40:5 2. └─sentimentr:::sentiment.get_sentences_character(mytext) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:53:5'): sentiment adversative.weight = 0 alters the output ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment(mytext) at test-sentiment.R:53:5 2. └─sentimentr:::sentiment.get_sentences_character(mytext) 3. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 4. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 5. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment.R:68:5'): sentiment_by plots a ggplot object ───────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(plot(sentiment(mytext)), "ggplot")) at test-sentiment.R:68:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(plot(sentiment(mytext)), "ggplot") 5. ├─base::plot(sentiment(mytext)) 6. ├─sentimentr::sentiment(mytext) 7. └─sentimentr:::sentiment.get_sentences_character(mytext) 8. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 9. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 10. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment_by.R:11:5'): sentiment_by gives combined elements when `by = NULL` ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(sentiment_by(mytext), "data.table")) at test-sentiment_by.R:11:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(sentiment_by(mytext), "data.table") 5. ├─sentimentr::sentiment_by(mytext) 6. └─sentimentr:::sentiment_by.get_sentences_character(mytext) 7. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 8. │ └─base::withCallingHandlers(...) 9. ├─sentimentr::sentiment(text.var = text.var, ...) 10. └─sentimentr:::sentiment.get_sentences_character(...) 11. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 12. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 13. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment_by.R:18:5'): sentiment_by gives combined group when `by` is given ── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─base::with(...) at test-sentiment_by.R:18:5 2. └─base::with.default(...) 3. └─base::eval(substitute(expr), data, enclos = parent.frame()) 4. └─base::eval(substitute(expr), data, enclos = parent.frame()) 5. ├─sentimentr::sentiment_by(...) 6. └─sentimentr:::sentiment_by.get_sentences_character(...) 7. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 8. │ └─base::withCallingHandlers(...) 9. ├─sentimentr::sentiment(text.var = text.var, ...) 10. └─sentimentr:::sentiment.get_sentences_character(...) 11. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 12. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 13. └─data.table:::`[.data.table`(...) ── Error ('test-sentiment_by.R:30:5'): sentiment_by plots a ggplot object ────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_true(is(plot(sentiment_by(mytext)), "ggplot")) at test-sentiment_by.R:30:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─methods::is(plot(sentiment_by(mytext)), "ggplot") 5. ├─base::plot(sentiment_by(mytext)) 6. ├─sentimentr::sentiment_by(mytext) 7. └─sentimentr:::sentiment_by.get_sentences_character(mytext) 8. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 9. │ └─base::withCallingHandlers(...) 10. ├─sentimentr::sentiment(text.var = text.var, ...) 11. └─sentimentr:::sentiment.get_sentences_character(...) 12. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 13. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 14. └─data.table:::`[.data.table`(...) ── Error ('test-uncombine.R:11:5'): uncombine ... ────────────────────────────── Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─sentimentr::sentiment_by(mytext) at test-uncombine.R:11:5 2. └─sentimentr:::sentiment_by.get_sentences_character(mytext) 3. ├─base::suppressWarnings(sentiment(text.var = text.var, ...)) 4. │ └─base::withCallingHandlers(...) 5. ├─sentimentr::sentiment(text.var = text.var, ...) 6. └─sentimentr:::sentiment.get_sentences_character(...) 7. └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex) 8. ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")] 9. └─data.table:::`[.data.table`(...) [ FAIL 12 | WARN 0 | SKIP 0 | PASS 16 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-fedora-gcc