Running ‘testthat.R’ [19s/23s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(saotd)
  > 
  > test_check("saotd")
  ── 1. Failure: bigrams are computed properly (@test_bigram.R#19)  ──────────────
  saotd::bigram(DataFrame = test_bigram_df) not equal to `correct_bigram_df`.
  Attributes: < Component "class": Lengths (1, 3) differ (string compare on first 1) >
  Attributes: < Component "class": 1 string mismatch >
  
  ── 2. Error: (unknown) (@test_number_topics.R#12)  ─────────────────────────────
  only 0's may be mixed with negative subscripts
  Backtrace:
    1. saotd::number_topics(...)
    2. dplyr::mutate(...)
    2. dplyr::mutate(., text = stringr::str_replace_all(text, "#", ""))
    2. dplyr::mutate(...)
    2. dplyr::mutate(...)
    2. dplyr::mutate(...)
    2. dplyr::mutate(...)
    2. dplyr::group_by(., key)
    2. tidytext::unnest_tokens(., word, text)
    9. dplyr::anti_join(., tidytext::stop_words)
   11. dplyr:::join_filter(x, y, by = by, type = "anti", na_matches = na_matches)
   13. dplyr:::dplyr_row_slice.grouped_df(x, idx)
   18. base::NextMethod()
  
  ── 3. Failure: Trigrams are computed properly (@test_trigram.R#21)  ────────────
  saotd::trigram(DataFrame = test_trigram_df) not equal to `correct_trigram_df`.
  Attributes: < Component "class": Lengths (1, 3) differ (string compare on first 1) >
  Attributes: < Component "class": 1 string mismatch >
  
  ── 4. Error: (unknown) (@test_tweet_topics.R#12)  ──────────────────────────────
  Assigned data `rows` must be compatible with existing data.
  ✖ Existing data has 3 rows.
  ✖ Assigned data has 43 rows.
  ℹ Only vectors of size 1 are recycled.
  Backtrace:
    1. saotd::tweet_topics(DataFrame = test_df, clusters = 3, num_terms = 5)
    2. dplyr::mutate(...)
    2. dplyr::mutate(., text = stringr::str_replace_all(text, "#", ""))
    2. dplyr::mutate(...)
    2. dplyr::mutate(...)
    2. dplyr::mutate(...)
    2. dplyr::mutate(...)
    2. dplyr::group_by(., key)
    2. tidytext::unnest_tokens(., word, text)
    9. dplyr::anti_join(., tidytext::stop_words)
   11. dplyr:::join_filter(x, y, by = by, type = "anti", na_matches = na_matches)
   13. dplyr:::dplyr_row_slice.grouped_df(x, idx)
   15. tibble:::`$<-.tbl_df`(...)
   16. tibble:::tbl_subassign(...)
   17. tibble:::vectbl_recycle_rhs(...)
   18. base::tryCatch(...)
   19. base:::tryCatchList(expr, classes, parentenv, handlers)
   20. base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   21. value[[3L]](cond)
  
  ── 5. Failure: unigrams are computed properly (@test_unigram.R#18)  ────────────
  saotd::unigram(DataFrame = test_unigram_df) not equal to `correct_unigram_df`.
  Attributes: < Component "class": Lengths (1, 3) differ (string compare on first 1) >
  Attributes: < Component "class": 1 string mismatch >
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 63 | SKIPPED: 0 | WARNINGS: 6 | FAILED: 5 ]
  1. Failure: bigrams are computed properly (@test_bigram.R#19) 
  2. Error: (unknown) (@test_number_topics.R#12) 
  3. Failure: Trigrams are computed properly (@test_trigram.R#21) 
  4. Error: (unknown) (@test_tweet_topics.R#12) 
  5. Failure: unigrams are computed properly (@test_unigram.R#18) 
  
  Error: testthat unit tests failed
  Execution halted