Running ‘testthat.R’ [12s/14s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(conversim)
  > 
  > test_check("conversim")
  boundary (singular) fit: see help('isSingular')
  Saving _problems/test-conversation_multidyads-77.R
  Loading required package: NLP
  
  Attaching package: 'NLP'
  
  The following object is masked from 'package:ggplot2':
  
      annotate
  
  Saving _problems/test-conversation_sequence-73.R
  Loading required package: SnowballC
  Saving _problems/test-main_functions-81.R
  Saving _problems/test-main_functions_utilities-36.R
  Saving _problems/test-main_functions_utilities-54.R
  Saving _problems/test-main_functions_utilities-70.R
  [ FAIL 6 | WARN 11 | SKIP 0 | PASS 141 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-conversation_multidyads.R:77:3'): sentiment_sim_dyads works correctly ──
  Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─conversim::sentiment_sim_dyads(preprocessed, window_size = 2) at test-conversation_multidyads.R:77:3
    2.   └─conversim::sentiment_similarity(window1, window2)
    3.     ├─sentimentr::sentiment_by(conv1)
    4.     └─sentimentr:::sentiment_by.character(conv1)
    5.       ├─base::suppressWarnings(sentiment(text.var = text.var, ...))
    6.       │ └─base::withCallingHandlers(...)
    7.       ├─sentimentr::sentiment(text.var = text.var, ...)
    8.       └─sentimentr:::sentiment.character(text.var = text.var, ...)
    9.         ├─sentimentr::sentiment(...)
   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-conversation_sequence.R:73:3'): sent_sim_seq works correctly ───
  Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─conversim::sent_sim_seq(sample_conversation, window_size = 3) at test-conversation_sequence.R:73:3
    2.   └─conversim::calc_sim_seq(conversation, window_size, conversim::sentiment_similarity)
    3.     └─conversim (local) similarity_func(window1, window2)
    4.       ├─sentimentr::sentiment_by(conv1)
    5.       └─sentimentr:::sentiment_by.character(conv1)
    6.         ├─base::suppressWarnings(sentiment(text.var = text.var, ...))
    7.         │ └─base::withCallingHandlers(...)
    8.         ├─sentimentr::sentiment(text.var = text.var, ...)
    9.         └─sentimentr:::sentiment.character(text.var = text.var, ...)
   10.           ├─sentimentr::sentiment(...)
   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-main_functions.R:81:3'): sentiment_similarity works correctly ──
  Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─conversim::sentiment_similarity(conv1, conv2) at test-main_functions.R:81:3
    2.   ├─sentimentr::sentiment_by(conv1)
    3.   └─sentimentr:::sentiment_by.character(conv1)
    4.     ├─base::suppressWarnings(sentiment(text.var = text.var, ...))
    5.     │ └─base::withCallingHandlers(...)
    6.     ├─sentimentr::sentiment(text.var = text.var, ...)
    7.     └─sentimentr:::sentiment.character(text.var = text.var, ...)
    8.       ├─sentimentr::sentiment(...)
    9.       └─sentimentr:::sentiment.get_sentences_character(...)
   10.         └─sentimentr:::make_sentence_df2(sents, retention_regex = retention_regex)
   11.           ├─dat[, `:=`(indx, wc < 1), by = c("id", "sentences", "wc")]
   12.           └─data.table:::`[.data.table`(...)
  ── Error ('test-main_functions_utilities.R:36:3'): gen_sim_report generates a valid report ──
  Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─conversim::gen_sim_report(speech1, speech2) at test-main_functions_utilities.R:36:3
    2.   └─conversim::sentiment_similarity(speech1, speech2)
    3.     ├─sentimentr::sentiment_by(conv1)
    4.     └─sentimentr:::sentiment_by.character(conv1)
    5.       ├─base::suppressWarnings(sentiment(text.var = text.var, ...))
    6.       │ └─base::withCallingHandlers(...)
    7.       ├─sentimentr::sentiment(text.var = text.var, ...)
    8.       └─sentimentr:::sentiment.character(text.var = text.var, ...)
    9.         ├─sentimentr::sentiment(...)
   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-main_functions_utilities.R:54:3'): print_sim_report works without errors ──
  Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─conversim::gen_sim_report(speech1, speech2) at test-main_functions_utilities.R:54:3
    2.   └─conversim::sentiment_similarity(speech1, speech2)
    3.     ├─sentimentr::sentiment_by(conv1)
    4.     └─sentimentr:::sentiment_by.character(conv1)
    5.       ├─base::suppressWarnings(sentiment(text.var = text.var, ...))
    6.       │ └─base::withCallingHandlers(...)
    7.       ├─sentimentr::sentiment(text.var = text.var, ...)
    8.       └─sentimentr:::sentiment.character(text.var = text.var, ...)
    9.         ├─sentimentr::sentiment(...)
   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-main_functions_utilities.R:70:3'): print_sim_report prints all similarity scores ──
  Error in ``[.data.table`(dat, , `:=`(indx, wc < 1), by = c("id", "sentences", "wc"))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. └─conversim::gen_sim_report(speech1, speech2) at test-main_functions_utilities.R:70:3
    2.   └─conversim::sentiment_similarity(speech1, speech2)
    3.     ├─sentimentr::sentiment_by(conv1)
    4.     └─sentimentr:::sentiment_by.character(conv1)
    5.       ├─base::suppressWarnings(sentiment(text.var = text.var, ...))
    6.       │ └─base::withCallingHandlers(...)
    7.       ├─sentimentr::sentiment(text.var = text.var, ...)
    8.       └─sentimentr:::sentiment.character(text.var = text.var, ...)
    9.         ├─sentimentr::sentiment(...)
   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`(...)
  
  [ FAIL 6 | WARN 11 | SKIP 0 | PASS 141 ]
  Error:
  ! Test failures.
  Execution halted