Running 'spelling.R' [0s/1s]
  Running 'testthat.R' [148s/166s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > 
  > library(testthat)
  > library(quanteda)
  Package version: 2.1.2
  Parallel computing: 2 of 32 threads used.
  See https://quanteda.io for tutorials and examples.
  
  Attaching package: 'quanteda'
  
  The following object is masked from 'package:utils':
  
      View
  
  > 
  > Sys.setenv("_R_CHECK_LENGTH_1_CONDITION_" = TRUE)
  > 
  > ops <- quanteda_options()
  > quanteda_options(reset = TRUE)
  > 
  > test_check("quanteda")
  == Skipped tests ===============================================================
  * For interactive visual inspection only (2)
  * NEEDS TO BE FIXED (1)
  * On CRAN (6)
  * On Linux (2)
  * Skip until textstat_simil() has been corrected for empty dfms (1)
  * Skipped because stats::chisq.test is wrong for small-value 2x2 tables (1)
  * Until we resolve metadoc issues (1)
  * as.numeric(stringi::stri_info()$Unicode.version) > 10 && as.numeric(stringi::stri_info()$ICU.version) >  is TRUE
      61.1 is TRUE (1)
  * defaults may have changed (1)
  * ngrams disabled in new tokens() (1)
  * not implemented yet (1)
  * requires spacyr installation to work (1)
  * skip until textstat_dist() works correctly for zero-variance documents (1)
  * skipping test of option setting when quanteda is not attached (1)
  * until all MA measures are made functional (1)
  * until textstat_dist() works correctly for empty dfms (1)
  * we no longer expect these to be the same (1)
  
  == Warnings ====================================================================
  -- Warning (test-corpus.R:376:5): corpus handles NA correctly (#1372, #1969) ---
  NA is replaced by empty string
  Backtrace:
   1. testthat::expect_true(!any(is.na(texts(corpus(txt))))) test-corpus.R:376:4
   6. quanteda:::corpus.character(txt)
  -- Warning (test-corpus.R:383:5): corpus handles NA correctly (#1372, #1969) ---
  NA is replaced by empty string
  Backtrace:
   1. testthat::expect_true(...) test-corpus.R:383:4
   6. quanteda:::corpus.data.frame(data.frame(text = txt, stringsAsFactors = FALSE))
   8. quanteda:::corpus.character(...)
  -- Warning (test-kwic.R:10:5): test attr(kwic, 'ntoken') with un-named texts ---
  NA is replaced by empty string
  Backtrace:
   1. quanteda::kwic(txt, "fox") test-kwic.R:10:4
   2. quanteda:::kwic.character(txt, "fox")
   5. quanteda:::corpus.character(x)
  -- Warning (test-textstat_proxy.R:318:5): use_na is working --------------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. quanteda::textstat_proxy(...) test-textstat_proxy.R:318:4
   2. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   3. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_proxy.R:319:5): use_na is working --------------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. quanteda::textstat_proxy(...) test-textstat_proxy.R:319:4
   2. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   3. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_proxy.R:320:5): use_na is working --------------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. quanteda::textstat_proxy(...) test-textstat_proxy.R:320:4
   2. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   3. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_proxy.R:325:5): use_na is working --------------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. quanteda::textstat_proxy(...) test-textstat_proxy.R:325:4
   2. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   3. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_proxy.R:326:5): use_na is working --------------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. quanteda::textstat_proxy(...) test-textstat_proxy.R:326:4
   2. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   3. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_proxy.R:327:5): use_na is working --------------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. quanteda::textstat_proxy(...) test-textstat_proxy.R:327:4
   2. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   3. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:88:5): textstat_simil() returns NA for zero-variance documents --
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equivalent(...) test-textstat_simil.R:88:4
   6. quanteda:::textstat_simil.dfm(mt, method = "correlation")
   7. quanteda::textstat_proxy(...)
   8. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   9. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:92:5): textstat_simil() returns NA for zero-variance documents --
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equal(...) test-textstat_simil.R:92:4
   6. quanteda:::textstat_simil.dfm(mt, method = "cosine")
   7. quanteda::textstat_proxy(...)
   8. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   9. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:97:5): textstat_simil() returns NA for zero-variance documents --
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equivalent(...) test-textstat_simil.R:97:4
   6. quanteda:::textstat_simil.dfm(mt, method = "jaccard")
   7. quanteda::textstat_proxy(...)
   8. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   9. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:102:5): textstat_simil() returns NA for zero-variance documents --
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equivalent(...) test-textstat_simil.R:102:4
   6. quanteda:::textstat_simil.dfm(mt, method = "ejaccard")
   7. quanteda::textstat_proxy(...)
   8. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   9. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:107:5): textstat_simil() returns NA for zero-variance documents --
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equivalent(...) test-textstat_simil.R:107:4
   6. quanteda:::textstat_simil.dfm(mt, method = "dice")
   7. quanteda::textstat_proxy(...)
   8. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   9. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:112:5): textstat_simil() returns NA for zero-variance documents --
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equal(...) test-textstat_simil.R:112:4
   6. quanteda:::textstat_simil.dfm(mt, method = "edice")
   7. quanteda::textstat_proxy(...)
   8. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   9. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:117:5): textstat_simil() returns NA for zero-variance documents --
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equal(...) test-textstat_simil.R:117:4
   6. quanteda:::textstat_simil.dfm(mt, method = "hamman")
   7. quanteda::textstat_proxy(...)
   8. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   9. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:122:5): textstat_simil() returns NA for zero-variance documents --
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equal(...) test-textstat_simil.R:122:4
   6. quanteda:::textstat_simil.dfm(mt, method = "simple matching")
   7. quanteda::textstat_proxy(...)
   8. quanteda:::make_na_matrix(dim(result), which(na1), which(na2))
   9. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:491:5): make_na_matrix is working ------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equal(...) test-textstat_simil.R:491:4
   5. quanteda:::make_na_matrix(c(5, 4), row = 2L:3L)
   6. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:499:5): make_na_matrix is working ------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equal(...) test-textstat_simil.R:499:4
   5. quanteda:::make_na_matrix(c(5, 4), col = 3L)
   6. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:507:5): make_na_matrix is working ------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equal(...) test-textstat_simil.R:507:4
   5. quanteda:::make_na_matrix(c(5, 4), col = 1L:2L, row = 2L:3L)
   6. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:514:5): make_na_matrix is working ------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equal(...) test-textstat_simil.R:514:4
   5. quanteda:::make_na_matrix(c(5, 4), 2L:3L, c(1L:2L))
   6. Matrix::sparseMatrix(...)
  -- Warning (test-textstat_simil.R:521:5): make_na_matrix is working ------------
  'giveCsparse' has been deprecated; setting 'repr = "T"' for you
  Backtrace:
   1. testthat::expect_equal(...) test-textstat_simil.R:521:4
   5. quanteda:::make_na_matrix(c(5, 4), 1L, 3L)
   6. Matrix::sparseMatrix(...)
  -- Warning (test-tokens.R:523:5): tokens works as expected with NA, and blanks --
  NA is replaced by empty string
  Backtrace:
    1. testthat::expect_equal(...) test-tokens.R:523:4
    6. quanteda:::tokens.character(c("one", NA, ""))
   10. quanteda:::corpus.character(x)
  -- Warning (test-tokens.R:527:5): tokens works as expected with NA, and blanks --
  NA is replaced by empty string
  Backtrace:
    1. testthat::expect_equal(...) test-tokens.R:527:4
    6. quanteda:::tokens.character(c(NA, "one", ""))
   10. quanteda:::corpus.character(x)
  -- Warning (test-tokens.R:535:5): tokens works as expected with NA, and blanks --
  NA is replaced by empty string
  Backtrace:
    1. testthat::expect_equal(...) test-tokens.R:535:4
    6. quanteda:::tokens.character(c(d1 = "", d2 = NA))
   10. quanteda:::corpus.character(x)
  -- Warning (test-tokens.R:539:5): tokens works as expected with NA, and blanks --
  NA is replaced by empty string
  Backtrace:
    1. testthat::expect_equal(...) test-tokens.R:539:4
    6. quanteda:::tokens.character(c(d1 = NA, d2 = ""))
   10. quanteda:::corpus.character(x)
  
  == Failed tests ================================================================
  -- Error (test-fcm.R:279:5): as.network.fcm works ------------------------------
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
      x
   1. +-quanteda::as.network(mat, min_freq = 1, omit_isolated = FALSE) test-fcm.R:279:4
   2. \-quanteda:::as.network.fcm(mat, min_freq = 1, omit_isolated = FALSE)
   3.   \-network::network(...)
   4.     +-network::as.network(...)
   5.     \-network::as.network.matrix(...)
   6.       \-network::network.initialize(...)
   7.         \-network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  -- Error (test-fcm.R:289:5): as.network.fcm works with window ------------------
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
      x
   1. +-quanteda::as.network(mat, min_freq = 1, omit_isolated = FALSE) test-fcm.R:289:4
   2. \-quanteda:::as.network.fcm(mat, min_freq = 1, omit_isolated = FALSE)
   3.   \-network::network(...)
   4.     +-network::as.network(...)
   5.     \-network::as.network.matrix(...)
   6.       \-network::network.initialize(...)
   7.         \-network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  -- Error (test-textplot_network.R:8:5): test textplot_network ------------------
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
       x
    1. +-testthat::expect_silent(...) test-textplot_network.R:8:4
    2. | \-testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. |   +-testthat:::.capture(...)
    4. |   | +-withr::with_output_sink(...)
    5. |   | | \-base::force(code)
    6. |   | +-base::withCallingHandlers(...)
    7. |   | \-base::withVisible(code)
    8. |   \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. +-quanteda::textplot_network(testfcm, vertex_color = "red", offset = 0.1)
   10. \-quanteda:::textplot_network.fcm(...)
   11.   +-quanteda::as.network(...)
   12.   \-quanteda:::as.network.fcm(...)
   13.     \-network::network(...)
   14.       +-network::as.network(...)
   15.       \-network::as.network.matrix(...)
   16.         \-network::network.initialize(...)
   17.           \-network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  -- Error (test-textplot_network.R:24:5): test textplot_network works with vectorlized argument --
  Error: attempt to set index 0/0 in SET_VECTOR_ELT
  Backtrace:
       x
    1. +-testthat::expect_silent(...) test-textplot_network.R:24:4
    2. | \-testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. |   +-testthat:::.capture(...)
    4. |   | +-withr::with_output_sink(...)
    5. |   | | \-base::force(code)
    6. |   | +-base::withCallingHandlers(...)
    7. |   | \-base::withVisible(code)
    8. |   \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. +-quanteda::textplot_network(...)
   10. \-quanteda:::textplot_network.fcm(...)
   11.   +-quanteda::as.network(...)
   12.   \-quanteda:::as.network.fcm(...)
   13.     \-network::network(...)
   14.       +-network::as.network(...)
   15.       \-network::as.network.matrix(...)
   16.         \-network::network.initialize(...)
   17.           \-network::set.vertex.attribute(g, "na", rep(FALSE, n), 1:n)
  
  [ FAIL 4 | WARN 26 | SKIP 24 | PASS 3051 ]
  Error: Test failures
  In addition: Warning messages:
  1: In parse(con, n = -1, srcfile = srcfile, encoding = "UTF-8") :
    unable to translate '<U+5B57>' to native encoding
  2: In parse(con, n = -1, srcfile = srcfile, encoding = "UTF-8") :
    unable to translate '<U+98DB><U+6A5F>' to native encoding
  3: In parse(con, n = -1, srcfile = srcfile, encoding = "UTF-8") :
    unable to translate '<U+6587><U+66F8><U+FF11>' to native encoding
  4: In parse(con, n = -1, srcfile = srcfile, encoding = "UTF-8") :
    unable to translate '<U+6587><U+66F8><U+FF12>' to native encoding
  5: In parse(con, n = -1, srcfile = srcfile, encoding = "UTF-8") :
    unable to translate '<U+6587><U+66F8><U+FF11>' to native encoding
  6: In parse(con, n = -1, srcfile = srcfile, encoding = "UTF-8") :
    unable to translate '<U+6587><U+66F8><U+FF12>' to native encoding
  Execution halted