Running 'spelling.R' [0s]
  Running 'testthat.R' [17s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > Sys.setenv("_R_CHECK_LENGTH_1_CONDITION_" = TRUE)
  > 
  > library("testthat")
  > # library("quanteda")
  > library("quanteda.textstats")
  > quanteda::quanteda_options(reset = TRUE)
  > 
  > test_check("quanteda.textstats")
  == Skipped tests ===============================================================
  * Skipped because stats::chisq.test is wrong for small-value 2x2 tables (1)
  * until all MA measures are made functional (1)
  
  == Failed tests ================================================================
  -- Error (test-textstat.R:3:1): (code run outside of `test_that()`) ------------
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(toks) test-textstat.R:3:0
    2. \-quanteda:::dfm.tokens(toks)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_dist.R:1:1): (code run outside of `test_that()`) -------
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_dist.R:1:0
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_entropy.R:5:5): test textstat_entropy is working -------
  Error: trying to get slot "virtual" from an object of a basic class ("NULL") with no slots
  Backtrace:
       x
    1. +-testthat::expect_equal(...) test-textstat_entropy.R:5:4
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-base::unname(apply(mt, 1, entropy::entropy, unit = "log2"))
    5. +-base::apply(mt, 1, entropy::entropy, unit = "log2")
    6. | +-base::as.matrix(X)
    7. | \-quanteda:::as.matrix.dfm(X)
    8. |   \-methods::as(x, "matrix")
    9. |     \-Matrix:::asMethod(object)
   10. \-methods::.selectSuperClasses(...)
   11.   \-base::vapply(ext, F, NA, USE.NAMES = FALSE)
   12.     \-methods:::FUN(X[[i]], ...)
   13.       \-methods:::isVirtualExt(exti)
  -- Error (test-textstat_entropy.R:20:5): test textstat_entropy works with empty documents or features --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::as.dfm(mt) test-textstat_entropy.R:20:4
    2. \-quanteda:::as.dfm.Matrix(mt)
    3.   \-quanteda:::matrix2dfm(x)
    4.     \-quanteda:::build_dfm(...)
    5.       \-methods::new(...)
    6.         +-methods::initialize(value, ...)
    7.         \-Matrix:::initialize(value, ...)
    8.           +-methods::callNextMethod()
    9.           \-methods:::.nextMethod(.Object = .Object, ... = ...)
   10.             \-methods::validObject(.Object)
  -- Error (test-textstat_frequency.R:2:5): test textstat_frequency without groups --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(quanteda::tokens(c("a a b b c d", "a d d d", "a a a"))) test-textstat_frequency.R:2:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_frequency.R:28:5): test textstat_frequency without groups --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-testthat::expect_identical(...) test-textstat_frequency.R:28:4
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-quanteda.textstats::textstat_frequency(...)
    5. +-quanteda::dfm(quanteda::tokens(corp1))
    6. \-quanteda:::dfm.tokens(quanteda::tokens(corp1))
    7.   +-quanteda:::dfm.dfm(...)
    8.   | \-quanteda::as.dfm(x)
    9.   \-quanteda:::build_dfm(...)
   10.     \-methods::new(...)
   11.       +-methods::initialize(value, ...)
   12.       \-Matrix:::initialize(value, ...)
   13.         +-methods::callNextMethod()
   14.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   15.           \-methods::validObject(.Object)
  -- Error (test-textstat_frequency.R:64:5): test textstat_frequency works with weights --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(quanteda::tokens(corp1)) test-textstat_frequency.R:64:4
    2. \-quanteda:::dfm.tokens(quanteda::tokens(corp1))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_frequency.R:81:5): raises error when dfm is empty (#1419) --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm_trim(quanteda::data_dfm_lbgexample, 1000) test-textstat_frequency.R:81:4
    2. \-quanteda:::dfm_trim.dfm(quanteda::data_dfm_lbgexample, 1000)
    3.   +-x[, !flag_all]
    4.   \-x[, !flag_all]
    5.     \-quanteda:::build_dfm(...)
    6.       \-methods::new(...)
    7.         +-methods::initialize(value, ...)
    8.         \-Matrix:::initialize(value, ...)
    9.           +-methods::callNextMethod()
   10.           \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.             \-methods::validObject(.Object)
  -- Error (test-textstat_frequency.R:88:5): test textstat_frequency ties methods defaults work (min) --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(quanteda::tokens(txt)) test-textstat_frequency.R:88:4
    2. \-quanteda:::dfm.tokens(quanteda::tokens(txt))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_frequency.R:98:5): test textstat_frequency with groups and weighted dfm (#1646) --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-`%>%`(...) test-textstat_frequency.R:98:4
    2. +-quanteda::dfm_tfidf(.)
    3. +-quanteda::dfm(quanteda::tokens(c("a a b b c d", "a d d d", "a a a")))
    4. \-quanteda:::dfm.tokens(...)
    5.   +-quanteda:::dfm.dfm(...)
    6.   | \-quanteda::as.dfm(x)
    7.   \-quanteda:::build_dfm(...)
    8.     \-methods::new(...)
    9.       +-methods::initialize(value, ...)
   10.       \-Matrix:::initialize(value, ...)
   11.         +-methods::callNextMethod()
   12.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   13.           \-methods::validObject(.Object)
  -- Error (test-textstat_frequency.R:119:3): textstat_frequency does not return NAs when n > nfeat --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(quanteda::tokens(c("a a b c d", "a d d e", "a b b"))) test-textstat_frequency.R:119:2
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:4:3): keyness_textstat chi2 computation is correct --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:4:2
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:33:5): keyness_textstat chi2 computation is correct for three rows --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(quanteda::tokens(txt)) test-textstat_keyness.R:33:4
    2. \-quanteda:::dfm.tokens(quanteda::tokens(txt))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:84:5): basic textstat_keyness works on two rows --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:84:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:100:5): textstat_keyness works with different targets --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:100:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:113:5): textstat_keyness combines non-target rows correctly --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:113:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:123:5): textstat_keyness errors --------------
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:123:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:134:5): keyness_textstat exact computation is correct --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:134:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:148:5): basic textstat_keyness exact works on two rows --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:148:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:227:5): keyness_textstat lr computation is correct --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:227:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:252:5): basic textstat_keyness lr works on two rows --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:252:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:263:5): textstat_keyness returns raw frequency counts --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:263:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:277:5): textstat_keyness returns correct pmi --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:277:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:299:5): textstat_keyness correction warnings for pmi and exact --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:299:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:318:5): group labels are correct, #1257 ------
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_keyness.R:318:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:335:5): raises error when dfm is empty (#1419) --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm_trim(quanteda::data_dfm_lbgexample, 1000) test-textstat_keyness.R:335:4
    2. \-quanteda:::dfm_trim.dfm(quanteda::data_dfm_lbgexample, 1000)
    3.   +-x[, !flag_all]
    4.   \-x[, !flag_all]
    5.     \-quanteda:::build_dfm(...)
    6.       \-methods::new(...)
    7.         +-methods::initialize(value, ...)
    8.         \-Matrix:::initialize(value, ...)
    9.           +-methods::callNextMethod()
   10.           \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.             \-methods::validObject(.Object)
  -- Error (test-textstat_keyness.R:341:5): keyness works correctly for default, single, and multiple targets --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-`%>%`(...) test-textstat_keyness.R:341:4
    2. +-quanteda::dfm(.)
    3. \-quanteda:::dfm.tokens(.)
    4.   +-quanteda:::dfm.dfm(...)
    5.   | \-quanteda::as.dfm(x)
    6.   \-quanteda:::build_dfm(...)
    7.     \-methods::new(...)
    8.       +-methods::initialize(value, ...)
    9.       \-Matrix:::initialize(value, ...)
   10.         +-methods::callNextMethod()
   11.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   12.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:4:5): textstat_lexdiv computation is correct --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(c(d1 = "b a b a b a b a", d2 = "a a b b"))) test-textstat_lexdiv.R:4:4
    2. \-quanteda:::dfm.tokens(tokens(c(d1 = "b a b a b a b a", d2 = "a a b b")))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:14:5): textstat_lexdiv CTTR works correctly ---
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(c(d1 = "b a b a b a b a", d2 = "a a b b"))) test-textstat_lexdiv.R:14:4
    2. \-quanteda:::dfm.tokens(tokens(c(d1 = "b a b a b a b a", d2 = "a a b b")))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:24:5): textstat_lexdiv R works correctly ------
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(c(d1 = "b a b a b a b a", d2 = "a a b b"))) test-textstat_lexdiv.R:24:4
    2. \-quanteda:::dfm.tokens(tokens(c(d1 = "b a b a b a b a", d2 = "a a b b")))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:34:5): textstat_lexdiv C works correctly ------
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(c(d1 = "b a b a b a b a", d2 = "a a b b"))) test-textstat_lexdiv.R:34:4
    2. \-quanteda:::dfm.tokens(tokens(c(d1 = "b a b a b a b a", d2 = "a a b b")))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:44:5): textstat_lexdiv Maas works correctly ---
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(c(d1 = "b a b a b a b a", d2 = "a a b b"))) test-textstat_lexdiv.R:44:4
    2. \-quanteda:::dfm.tokens(tokens(c(d1 = "b a b a b a b a", d2 = "a a b b")))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:54:5): textstat_lexdiv Yule's I works correctly --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(c(d1 = "a b c", d2 = "a a b b c"))) test-textstat_lexdiv.R:54:4
    2. \-quanteda:::dfm.tokens(tokens(c(d1 = "a b c", d2 = "a a b b c")))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:66:5): textstat_lexdiv works with a single document dfm (#706) --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(mytxt)) test-textstat_lexdiv.R:66:4
    2. \-quanteda:::dfm.tokens(tokens(mytxt))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:76:5): raises error when dfm is empty (#1419) --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm_trim(data_dfm_lbgexample, 1000) test-textstat_lexdiv.R:76:4
    2. \-quanteda:::dfm_trim.dfm(data_dfm_lbgexample, 1000)
    3.   +-x[, !flag_all]
    4.   \-x[, !flag_all]
    5.     \-quanteda:::build_dfm(...)
    6.       \-methods::new(...)
    7.         +-methods::initialize(value, ...)
    8.         \-Matrix:::initialize(value, ...)
    9.           +-methods::callNextMethod()
   10.           \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.             \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:95:5): Yule's K and Herndon's Vm correction are (approximately) correct --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-`%>%`(...) test-textstat_lexdiv.R:95:4
    2. +-quanteda::dfm(.)
    3. \-quanteda:::dfm.tokens(.)
    4.   +-quanteda:::dfm.dfm(...)
    5.   | \-quanteda::as.dfm(x)
    6.   \-quanteda:::build_dfm(...)
    7.     \-methods::new(...)
    8.       +-methods::initialize(value, ...)
    9.       \-Matrix:::initialize(value, ...)
   10.         +-methods::callNextMethod()
   11.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   12.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:161:5): textstat_lexdiv works similarly for corpus and tokens --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(txt)) test-textstat_lexdiv.R:161:4
    2. \-quanteda:::dfm.tokens(tokens(txt))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:172:5): textstat_lexdiv supports removal of punctuation, numbers and symbols --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(txt)) test-textstat_lexdiv.R:172:4
    2. \-quanteda:::dfm.tokens(tokens(txt))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:185:5): textstat_lexdiv supports removal of hyphenation --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_lexdiv.R:185:4
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:196:5): textstat_lexdiv can handle hyphenated words containing duplicated tokens  --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(corpus(c(d1 = "have we not-we-have bicycle ! % 123 ^ ")))) test-textstat_lexdiv.R:196:4
    2. \-quanteda:::dfm.tokens(tokens(corpus(c(d1 = "have we not-we-have bicycle ! % 123 ^ "))))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:212:5): textstat_lexdiv.dfm and .tokens work same with remove_* options --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-testthat::expect_identical(...) test-textstat_lexdiv.R:212:4
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-quanteda.textstats::textstat_lexdiv(...)
    5. \-quanteda.textstats:::textstat_lexdiv.tokens(...)
    6.   +-quanteda.textstats:::compute_lexdiv_dfm_stats(...)
    7.   | \-quanteda::ntoken(x)
    8.   +-quanteda::dfm(x)
    9.   \-quanteda:::dfm.tokens(x)
   10.     +-quanteda:::dfm.dfm(...)
   11.     | \-quanteda::as.dfm(x)
   12.     \-quanteda:::build_dfm(...)
   13.       \-methods::new(...)
   14.         +-methods::initialize(value, ...)
   15.         \-Matrix:::initialize(value, ...)
   16.           +-methods::callNextMethod()
   17.           \-methods:::.nextMethod(.Object = .Object, ... = ...)
   18.             \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:243:5): textstat_lexdiv does not support dfm for MATTR and MSTTR --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens(mytxt)) test-textstat_lexdiv.R:243:4
    2. \-quanteda:::dfm.tokens(tokens(mytxt))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:259:5): textstat_lexdiv.tokens raises errors if parameters for moving measures are not specified --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-testthat::expect_warning(...) test-textstat_lexdiv.R:259:4
    2. | \-testthat:::quasi_capture(enquo(object), label, capture_warnings)
    3. |   +-testthat:::.capture(...)
    4. |   | \-base::withCallingHandlers(...)
    5. |   \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. +-quanteda.textstats::textstat_lexdiv(...)
    7. \-quanteda.textstats:::textstat_lexdiv.tokens(...)
    8.   +-quanteda.textstats:::compute_lexdiv_dfm_stats(...)
    9.   | \-quanteda::ntoken(x)
   10.   +-quanteda::dfm(x)
   11.   \-quanteda:::dfm.tokens(x)
   12.     +-quanteda:::dfm.dfm(...)
   13.     | \-quanteda::as.dfm(x)
   14.     \-quanteda:::build_dfm(...)
   15.       \-methods::new(...)
   16.         +-methods::initialize(value, ...)
   17.         \-Matrix:::initialize(value, ...)
   18.           +-methods::callNextMethod()
   19.           \-methods:::.nextMethod(.Object = .Object, ... = ...)
   20.             \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:276:5): textstat_lexdiv.tokens MATTR works correctly on its own --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-testthat::expect_identical(...) test-textstat_lexdiv.R:276:4
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-quanteda.textstats::textstat_lexdiv(...)
    5. \-quanteda.textstats:::textstat_lexdiv.tokens(...)
    6.   +-quanteda.textstats:::compute_lexdiv_dfm_stats(...)
    7.   | \-quanteda::ntoken(x)
    8.   +-quanteda::dfm(x)
    9.   \-quanteda:::dfm.tokens(x)
   10.     +-quanteda:::dfm.dfm(...)
   11.     | \-quanteda::as.dfm(x)
   12.     \-quanteda:::build_dfm(...)
   13.       \-methods::new(...)
   14.         +-methods::initialize(value, ...)
   15.         \-Matrix:::initialize(value, ...)
   16.           +-methods::callNextMethod()
   17.           \-methods:::.nextMethod(.Object = .Object, ... = ...)
   18.             \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:300:5): textstat_lexdiv.tokens MATTR works correctly in conjunction with static measures --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-testthat::expect_equivalent(...) test-textstat_lexdiv.R:300:4
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-quanteda.textstats::textstat_lexdiv(...)
    5. \-quanteda.textstats:::textstat_lexdiv.tokens(...)
    6.   +-quanteda.textstats:::compute_lexdiv_dfm_stats(...)
    7.   | \-quanteda::ntoken(x)
    8.   +-quanteda::dfm(x)
    9.   \-quanteda:::dfm.tokens(x)
   10.     +-quanteda:::dfm.dfm(...)
   11.     | \-quanteda::as.dfm(x)
   12.     \-quanteda:::build_dfm(...)
   13.       \-methods::new(...)
   14.         +-methods::initialize(value, ...)
   15.         \-Matrix:::initialize(value, ...)
   16.           +-methods::callNextMethod()
   17.           \-methods:::.nextMethod(.Object = .Object, ... = ...)
   18.             \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:314:5): textstat_lexdiv.tokens MSTTR works correctly on its own --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-testthat::expect_equivalent(...) test-textstat_lexdiv.R:314:4
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-quanteda.textstats::textstat_lexdiv(...)
    5. \-quanteda.textstats:::textstat_lexdiv.tokens(...)
    6.   +-quanteda.textstats:::compute_lexdiv_dfm_stats(...)
    7.   | \-quanteda::ntoken(x)
    8.   +-quanteda::dfm(x)
    9.   \-quanteda:::dfm.tokens(x)
   10.     +-quanteda:::dfm.dfm(...)
   11.     | \-quanteda::as.dfm(x)
   12.     \-quanteda:::build_dfm(...)
   13.       \-methods::new(...)
   14.         +-methods::initialize(value, ...)
   15.         \-Matrix:::initialize(value, ...)
   16.           +-methods::callNextMethod()
   17.           \-methods:::.nextMethod(.Object = .Object, ... = ...)
   18.             \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:339:5): textstat_lexdiv.tokens MSTTR works correctly in conjunction with static measures --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-testthat::expect_equivalent(...) test-textstat_lexdiv.R:339:4
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-quanteda.textstats::textstat_lexdiv(...)
    5. \-quanteda.textstats:::textstat_lexdiv.tokens(...)
    6.   +-quanteda.textstats:::compute_lexdiv_dfm_stats(...)
    7.   | \-quanteda::ntoken(x)
    8.   +-quanteda::dfm(x)
    9.   \-quanteda:::dfm.tokens(x)
   10.     +-quanteda:::dfm.dfm(...)
   11.     | \-quanteda::as.dfm(x)
   12.     \-quanteda:::build_dfm(...)
   13.       \-methods::new(...)
   14.         +-methods::initialize(value, ...)
   15.         \-Matrix:::initialize(value, ...)
   16.           +-methods::callNextMethod()
   17.           \-methods:::.nextMethod(.Object = .Object, ... = ...)
   18.             \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:350:5): compute_MSTTR internal function has working exception handlers --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-testthat::expect_warning(...) test-textstat_lexdiv.R:350:4
    2. | \-testthat:::quasi_capture(enquo(object), label, capture_warnings)
    3. |   +-testthat:::.capture(...)
    4. |   | \-base::withCallingHandlers(...)
    5. |   \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. \-quanteda.textstats:::compute_msttr(mytoken, 20)
    7.   +-base::split(...)
    8.   +-quanteda.textstats::textstat_lexdiv(x, measure = "TTR")
    9.   \-quanteda.textstats:::textstat_lexdiv.tokens(x, measure = "TTR")
   10.     +-quanteda.textstats:::compute_lexdiv_dfm_stats(...)
   11.     | \-quanteda::ntoken(x)
   12.     +-quanteda::dfm(x)
   13.     \-quanteda:::dfm.tokens(x)
   14.       +-quanteda:::dfm.dfm(...)
   15.       | \-quanteda::as.dfm(x)
   16.       \-quanteda:::build_dfm(...)
   17.         \-methods::new(...)
   18.           +-methods::initialize(value, ...)
   19.           \-Matrix:::initialize(value, ...)
   20.             +-methods::callNextMethod()
   21.             \-methods:::.nextMethod(.Object = .Object, ... = ...)
   22.               \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:394:5): textstat_lexdiv works with measure = 'all' --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda.textstats::textstat_lexdiv(...) test-textstat_lexdiv.R:394:4
    2. +-quanteda::dfm(tokens("What, oh what, are we doing?"))
    3. \-quanteda:::dfm.tokens(tokens("What, oh what, are we doing?"))
    4.   +-quanteda:::dfm.dfm(...)
    5.   | \-quanteda::as.dfm(x)
    6.   \-quanteda:::build_dfm(...)
    7.     \-methods::new(...)
    8.       +-methods::initialize(value, ...)
    9.       \-Matrix:::initialize(value, ...)
   10.         +-methods::callNextMethod()
   11.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   12.           \-methods::validObject(.Object)
  -- Error (test-textstat_lexdiv.R:403:5): dfm_split_hyphenated_features works as expected --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(tokens("One-two one two three.")) test-textstat_lexdiv.R:403:4
    2. \-quanteda:::dfm.tokens(tokens("One-two one two three."))
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_proxy.R:3:1): (code run outside of `test_that()`) ------
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-`%>%`(...) test-textstat_proxy.R:3:0
    2. +-quanteda::dfm_trim(., min_termfreq = 5)
    3. +-quanteda::dfm(.)
    4. \-quanteda:::dfm.tokens(.)
    5.   +-quanteda:::dfm.dfm(...)
    6.   | \-quanteda::as.dfm(x)
    7.   \-quanteda:::build_dfm(...)
    8.     \-methods::new(...)
    9.       +-methods::initialize(value, ...)
   10.       \-Matrix:::initialize(value, ...)
   11.         +-methods::callNextMethod()
   12.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   13.           \-methods::validObject(.Object)
  -- Error (test-textstat_readability.R:22:5): readability works with sentence length filtering --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda.textstats::textstat_readability(txt, measure = "all") test-textstat_readability.R:22:4
    2. \-quanteda.textstats:::textstat_readability.character(txt, measure = "all")
    3.   +-quanteda.textstats::textstat_readability(...)
    4.   \-quanteda.textstats:::textstat_readability.corpus(...)
    5.     +-quanteda.textstats::textstat_lexdiv(...)
    6.     +-quanteda::dfm(tokens(x), verbose = FALSE)
    7.     \-quanteda:::dfm.tokens(tokens(x), verbose = FALSE)
    8.       +-quanteda:::dfm.dfm(...)
    9.       | \-quanteda::as.dfm(x)
   10.       \-quanteda:::build_dfm(...)
   11.         \-methods::new(...)
   12.           +-methods::initialize(value, ...)
   13.           \-Matrix:::initialize(value, ...)
   14.             +-methods::callNextMethod()
   15.             \-methods:::.nextMethod(.Object = .Object, ... = ...)
   16.               \-methods::validObject(.Object)
  -- Error (test-textstat_readability.R:156:5): textstat_readability computes all measures (#1701) --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-testthat::expect_true(...) test-textstat_readability.R:156:4
    2. | \-testthat::quasi_label(enquo(object), label, arg = "object")
    3. |   \-rlang::eval_bare(expr, quo_get_env(quo))
    4. +-quanteda.textstats::textstat_readability(...)
    5. \-quanteda.textstats:::textstat_readability.character(...)
    6.   +-quanteda.textstats::textstat_readability(...)
    7.   \-quanteda.textstats:::textstat_readability.corpus(...)
    8.     +-quanteda.textstats::textstat_lexdiv(...)
    9.     +-quanteda::dfm(tokens(x), verbose = FALSE)
   10.     \-quanteda:::dfm.tokens(tokens(x), verbose = FALSE)
   11.       +-quanteda:::dfm.dfm(...)
   12.       | \-quanteda::as.dfm(x)
   13.       \-quanteda:::build_dfm(...)
   14.         \-methods::new(...)
   15.           +-methods::initialize(value, ...)
   16.           \-Matrix:::initialize(value, ...)
   17.             +-methods::callNextMethod()
   18.             \-methods:::.nextMethod(.Object = .Object, ... = ...)
   19.               \-methods::validObject(.Object)
  -- Error (test-textstat_readability.R:187:5): man/textstat_readability returns NA for empty documents --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda.textstats::textstat_readability(txt, "all") test-textstat_readability.R:187:4
    2. \-quanteda.textstats:::textstat_readability.character(txt, "all")
    3.   +-quanteda.textstats::textstat_readability(...)
    4.   \-quanteda.textstats:::textstat_readability.corpus(...)
    5.     +-quanteda.textstats::textstat_lexdiv(...)
    6.     +-quanteda::dfm(tokens(x), verbose = FALSE)
    7.     \-quanteda:::dfm.tokens(tokens(x), verbose = FALSE)
    8.       +-quanteda:::dfm.dfm(...)
    9.       | \-quanteda::as.dfm(x)
   10.       \-quanteda:::build_dfm(...)
   11.         \-methods::new(...)
   12.           +-methods::initialize(value, ...)
   13.           \-Matrix:::initialize(value, ...)
   14.             +-methods::callNextMethod()
   15.             \-methods:::.nextMethod(.Object = .Object, ... = ...)
   16.               \-methods::validObject(.Object)
  -- Error (test-textstat_simil.R:3:1): (code run outside of `test_that()`) ------
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(...) test-textstat_simil.R:3:0
    2. \-quanteda:::dfm.tokens(...)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_summary.R:5:5): textstat_summary method works ----------
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda::dfm(toks) test-textstat_summary.R:5:4
    2. \-quanteda:::dfm.tokens(toks)
    3.   +-quanteda:::dfm.dfm(...)
    4.   | \-quanteda::as.dfm(x)
    5.   \-quanteda:::build_dfm(...)
    6.     \-methods::new(...)
    7.       +-methods::initialize(value, ...)
    8.       \-Matrix:::initialize(value, ...)
    9.         +-methods::callNextMethod()
   10.         \-methods:::.nextMethod(.Object = .Object, ... = ...)
   11.           \-methods::validObject(.Object)
  -- Error (test-textstat_summary.R:86:5): textstat_summary counts hashtag and emoji correctly --
  Error: invalid class "dfm" object: superclass "Mnumeric" not defined in the environment of the object's class
  Backtrace:
       x
    1. +-quanteda.textstats::textstat_summary(toks) test-textstat_summary.R:86:4
    2. \-quanteda.textstats:::textstat_summary.tokens(toks)
    3.   \-quanteda.textstats:::summarize(as.tokens(x), ...)
    4.     +-quanteda::dfm(if (is.corpus(x)) tokens(x) else x, ...)
    5.     \-quanteda:::dfm.tokens(if (is.corpus(x)) tokens(x) else x, ...)
    6.       +-quanteda:::dfm.dfm(...)
    7.       | \-quanteda::as.dfm(x)
    8.       \-quanteda:::build_dfm(...)
    9.         \-methods::new(...)
   10.           +-methods::initialize(value, ...)
   11.           \-Matrix:::initialize(value, ...)
   12.             +-methods::callNextMethod()
   13.             \-methods:::.nextMethod(.Object = .Object, ... = ...)
   14.               \-methods::validObject(.Object)
  
  [ FAIL 57 | WARN 0 | SKIP 2 | PASS 80 ]
  Error: Test failures
  Execution halted