Running ‘testthat.R’ [28s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(polmineR)
  
  Attaching package: 'polmineR'
  
  The following object is masked from 'package:testthat':
  
      context
  
  > use("polmineR")
  ... activating corpus: GERMAPARLMINI (version: 0.0.1 | build date: 2019-02-23)
  ... activating corpus: REUTERS
  > 
  > test_check("polmineR")
  [ FAIL 45 | WARN 11 | SKIP 7 | PASS 298 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (4)
  • empty test (3)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_as.DocumentTermMatrix.R:9:5): Generate Term-Document-Matrix from corpus using as.TermDocumentMatrix ──
  Error in `if (.Object@encoding != localeToCharset()[1]) avs <- as.nativeEnc(avs, 
      from = .Object@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test_as.DocumentTermMatrix.R:9:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─polmineR::sAttributes("REUTERS", "id")
    5.   ├─polmineR::s_attributes(...)
    6.   └─polmineR::s_attributes(...)
    7.     └─polmineR .local(.Object, ...)
    8.       ├─polmineR::s_attributes(...)
    9.       └─polmineR::s_attributes(...)
   10.         └─polmineR .local(.Object, ...)
  ── Error (test_as.DocumentTermMatrix.R:40:5): identity of as.TermDocumentMatrix and as.DocumentTermMatrix ──
  Error in `if (.Object@encoding != localeToCharset()[1]) avs <- as.nativeEnc(avs, 
      from = .Object@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─polmineR::as.speeches("GERMAPARLMINI", s_attribute_name = "speaker") at test_as.DocumentTermMatrix.R:40:4
   2. └─polmineR::as.speeches("GERMAPARLMINI", s_attribute_name = "speaker")
   3.   └─polmineR .local(.Object, ...)
   4.     ├─polmineR::as.speeches(...)
   5.     └─polmineR::as.speeches(...)
   6.       └─polmineR .local(.Object, ...)
   7.         ├─polmineR::s_attributes(...)
   8.         └─polmineR::s_attributes(...)
   9.           └─polmineR .local(.Object, ...)
  ── Error (test_as.DocumentTermMatrix.R:54:5): Check ways to generate DocumentTermMatrix against each other ──
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'as.sparseMatrix': missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─count(pb, p_attribute = "word", verbose = FALSE) %>% ... at test_as.DocumentTermMatrix.R:54:4
    2. ├─polmineR::as.sparseMatrix(., col = "count")
    3. ├─polmineR::count(pb, p_attribute = "word", verbose = FALSE)
    4. ├─polmineR::count(pb, p_attribute = "word", verbose = FALSE)
    5. │ └─polmineR .local(.Object, ...)
    6. │   ├─...[]
    7. │   └─data.table:::`[.data.table`(...)
    8. │     └─base::eval(jsub, SDenv, parent.frame())
    9. │       └─base::eval(jsub, SDenv, parent.frame())
   10. └─base::.handleSimpleError(...)
   11.   └─base h(simpleError(msg, call))
  ── Error (test_as.data.table.R:34:5): as.data.table ────────────────────────────
  Error in `if (localeToCharset()[1] != x@encoding) expr <- .recode_call(x = expr, 
      from = localeToCharset()[1], to = x@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─corpus("REUTERS") %>% subset(grep("saudi-arabia", places)) at test_as.data.table.R:34:4
   2. ├─base::subset(., grep("saudi-arabia", places))
   3. └─polmineR::subset(., grep("saudi-arabia", places))
   4.   └─polmineR .local(x, ...)
  ── Error (test_as.markdown.R:10:5): as.markdown ────────────────────────────────
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─polmineR::as.markdown(p) at test_as.markdown.R:10:4
    2. └─polmineR::as.markdown(p)
    3.   └─polmineR .local(.Object, ...)
    4.     ├─polmineR::as.markdown(...)
    5.     └─polmineR::as.markdown(...)
    6.       └─polmineR .local(.Object, ...)
    7.         ├─polmineR::get_token_stream(...)
    8.         └─polmineR::get_token_stream(...)
    9.           └─polmineR .local(.Object, ...)
   10.             ├─methods::callNextMethod()
   11.             └─polmineR .nextMethod(...)
   12.               └─polmineR .local(.Object, ...)
   13.                 ├─polmineR::get_token_stream(...)
   14.                 └─polmineR::get_token_stream(...)
   15.                   ├─polmineR::get_token_stream(cpos(.Object), ...)
   16.                   └─polmineR::get_token_stream(cpos(.Object), ...)
   17.                     └─polmineR .local(.Object, ...)
   18.                       ├─polmineR::decode(...)
   19.                       └─polmineR::decode(...)
   20.                         └─polmineR .local(.Object, ...)
   21.                           └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_as.markdown.R:40:5): plpr_partition ─────────────────────────────
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─polmineR::as.markdown(m) at test_as.markdown.R:40:4
    2. └─polmineR::as.markdown(m)
    3.   └─polmineR .local(.Object, ...)
    4.     ├─polmineR::as.markdown(...)
    5.     └─polmineR::as.markdown(...)
    6.       └─polmineR .local(.Object, ...)
    7.         └─base::sapply(...)
    8.           └─base::lapply(X = X, FUN = FUN, ...)
    9.             └─polmineR FUN(X[[i]], ...)
   10.               ├─polmineR::get_token_stream(...)
   11.               └─polmineR::get_token_stream(...)
   12.                 ├─polmineR::get_token_stream(cpos(.Object), ...)
   13.                 └─polmineR::get_token_stream(cpos(.Object), ...)
   14.                   └─polmineR .local(.Object, ...)
   15.                     ├─polmineR::decode(...)
   16.                     └─polmineR::decode(...)
   17.                       └─polmineR .local(.Object, ...)
   18.                         └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_as.markdown.R:64:5): read ───────────────────────────────────────
  Error in `if (localeToCharset()[1] != x@encoding) {
      s_attr_dots <- lapply(s_attr_dots, function(v) as.corpusEnc(v, 
          corpusEnc = x@encoding))
  }`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─base::subset(corpus("REUTERS"), places = "argentina") at test_as.markdown.R:64:4
   2. └─polmineR::subset(corpus("REUTERS"), places = "argentina")
   3.   └─polmineR .local(x, ...)
  ── Error (test_as.regions.R:11:5): coerce to regions ───────────────────────────
  Error in `if (localeToCharset()[1] != x@encoding) expr <- .recode_call(x = expr, 
      from = localeToCharset()[1], to = x@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─base::subset("GERMAPARLMINI", speaker == "Angela Dorothea Merkel") at test_as.regions.R:11:4
   2. └─polmineR::subset("GERMAPARLMINI", speaker == "Angela Dorothea Merkel")
   3.   ├─base::subset(x = corpus(x), ...)
   4.   └─polmineR::subset(x = corpus(x), ...)
   5.     └─polmineR .local(x, ...)
  ── Error (test_as.speeches.R:12:5): as.speeches ────────────────────────────────
  Error in `if (.Object@encoding != localeToCharset()[1]) avs <- as.nativeEnc(avs, 
      from = .Object@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─polmineR::as.speeches(corpus("GERMAPARLMINI"), s_attribute_name = "speaker") at test_as.speeches.R:12:4
   2. └─polmineR::as.speeches(corpus("GERMAPARLMINI"), s_attribute_name = "speaker")
   3.   └─polmineR .local(.Object, ...)
   4.     ├─polmineR::s_attributes(...)
   5.     └─polmineR::s_attributes(...)
   6.       └─polmineR .local(.Object, ...)
  ── Error (test_as.speeches.R:31:5): tdm for as.speeches ────────────────────────
  Error in `if (localeToCharset()[1] == enc) str_raw else as.nativeEnc(str_raw, 
      from = enc)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─polmineR::count(pb, p_attribute = "word") at test_as.speeches.R:31:4
   2. └─polmineR::count(pb, p_attribute = "word")
   3.   └─polmineR .local(.Object, ...)
   4.     ├─...[]
   5.     └─data.table:::`[.data.table`(...)
   6.       └─base::eval(jsub, SDenv, parent.frame())
   7.         └─base::eval(jsub, SDenv, parent.frame())
  ── Error (test_as.speeches.R:50:5): tdm for as.speeches, but partition/subcorpus ──
  Error in `if (localeToCharset()[1] == enc) str_raw else as.nativeEnc(str_raw, 
      from = enc)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─polmineR::count(pb, p_attribute = "word") at test_as.speeches.R:50:4
   2. └─polmineR::count(pb, p_attribute = "word")
   3.   └─polmineR .local(.Object, ...)
   4.     ├─...[]
   5.     └─data.table:::`[.data.table`(...)
   6.       └─base::eval(jsub, SDenv, parent.frame())
   7.         └─base::eval(jsub, SDenv, parent.frame())
  ── Error (test_count.R:29:3): count (multiple queries) ─────────────────────────
  Error in `if (localeToCharset()[1] != x@encoding) expr <- .recode_call(x = expr, 
      from = localeToCharset()[1], to = x@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─corpus("REUTERS") %>% subset(grepl("kuwait", places)) at test_count.R:29:2
   2. ├─base::subset(., grepl("kuwait", places))
   3. └─polmineR::subset(., grepl("kuwait", places))
   4.   └─polmineR .local(x, ...)
  ── Error (test_count.R:54:3): count - breakdown ────────────────────────────────
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─polmineR::count("REUTERS", query = "\"remain.*\"", breakdown = TRUE) at test_count.R:54:2
    2. └─polmineR::count("REUTERS", query = "\"remain.*\"", breakdown = TRUE)
    3.   └─polmineR .local(.Object, ...)
    4.     ├─polmineR::count(...)
    5.     └─polmineR::count(...)
    6.       └─polmineR .local(.Object, ...)
    7.         ├─polmineR::count(...)
    8.         └─polmineR::count(...)
    9.           └─polmineR .local(.Object, ...)
   10.             └─base::lapply(...)
   11.               └─polmineR FUN(X[[i]], ...)
   12.                 ├─polmineR::get_token_stream(...)
   13.                 └─polmineR::get_token_stream(...)
   14.                   └─polmineR .local(.Object, ...)
   15.                     ├─polmineR::decode(...)
   16.                     └─polmineR::decode(...)
   17.                       └─polmineR .local(.Object, ...)
   18.                         └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_count.R:63:5): count over partition_bundle ──────────────────────
  Error in `if (.Object@encoding != localeToCharset()[1]) avs <- as.nativeEnc(avs, 
      from = .Object@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─corpus("GERMAPARLMINI") %>% as.speeches(s_attribute_name = "speaker") at test_count.R:63:4
   2. ├─polmineR::as.speeches(., s_attribute_name = "speaker")
   3. └─polmineR::as.speeches(., s_attribute_name = "speaker")
   4.   └─polmineR .local(.Object, ...)
   5.     ├─polmineR::s_attributes(...)
   6.     └─polmineR::s_attributes(...)
   7.       └─polmineR .local(.Object, ...)
  ── Error (test_count.R:89:5): count over partition_bundle with phrases ─────────
  Error in `if (.Object@encoding != localeToCharset()[1]) avs <- as.nativeEnc(avs, 
      from = .Object@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─corpus("GERMAPARLMINI") %>% ... at test_count.R:89:4
   2. ├─polmineR::as.speeches(., s_attribute_name = "speaker", progress = FALSE)
   3. └─polmineR::as.speeches(., s_attribute_name = "speaker", progress = FALSE)
   4.   └─polmineR .local(.Object, ...)
   5.     ├─polmineR::s_attributes(...)
   6.     └─polmineR::s_attributes(...)
   7.       └─polmineR .local(.Object, ...)
  ── Error (test_cpos.R:40:5): cpos-method for subcorpus ─────────────────────────
  Error in `if (localeToCharset()[1] != x@encoding) expr <- .recode_call(x = expr, 
      from = localeToCharset()[1], to = x@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─corpus("REUTERS") %>% subset(grepl("saudi-arabia", places)) at test_cpos.R:40:4
   2. ├─base::subset(., grepl("saudi-arabia", places))
   3. └─polmineR::subset(., grepl("saudi-arabia", places))
   4.   └─polmineR .local(x, ...)
  ── Error (test_decode.R:9:5): decode entire corpus ─────────────────────────────
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─polmineR::decode("GERMAPARLMINI", to = "data.table") at test_decode.R:9:4
    2. └─polmineR::decode("GERMAPARLMINI", to = "data.table")
    3.   └─polmineR .local(.Object, ...)
    4.     ├─polmineR::decode(...)
    5.     └─polmineR::decode(...)
    6.       └─polmineR .local(.Object, ...)
    7.         └─base::lapply(...)
    8.           └─polmineR FUN(X[[i]], ...)
    9.             ├─polmineR::get_token_stream(.Object, p_attribute = p_attr, decode = decode)
   10.             └─polmineR::get_token_stream(.Object, p_attribute = p_attr, decode = decode)
   11.               └─polmineR .local(.Object, ...)
   12.                 ├─polmineR::get_token_stream(...)
   13.                 └─polmineR::get_token_stream(...)
   14.                   └─polmineR .local(.Object, ...)
   15.                     ├─polmineR::decode(...)
   16.                     └─polmineR::decode(...)
   17.                       └─polmineR .local(.Object, ...)
   18.                         └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_decode.R:20:5): decode corpus selectively ───────────────────────
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─corpus("GERMAPARLMINI") %>% ... at test_decode.R:20:4
    2. ├─polmineR::decode(...)
    3. └─polmineR::decode(...)
    4.   └─polmineR .local(.Object, ...)
    5.     └─base::lapply(...)
    6.       └─polmineR FUN(X[[i]], ...)
    7.         ├─polmineR::get_token_stream(.Object, p_attribute = p_attr, decode = decode)
    8.         └─polmineR::get_token_stream(.Object, p_attribute = p_attr, decode = decode)
    9.           └─polmineR .local(.Object, ...)
   10.             ├─polmineR::get_token_stream(...)
   11.             └─polmineR::get_token_stream(...)
   12.               └─polmineR .local(.Object, ...)
   13.                 ├─polmineR::decode(...)
   14.                 └─polmineR::decode(...)
   15.                   └─polmineR .local(.Object, ...)
   16.                     └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_decode.R:32:5): decode corpus without s-attributes ──────────────
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─corpus("GERMAPARLMINI") %>% ... at test_decode.R:32:4
    2. ├─polmineR::decode(...)
    3. └─polmineR::decode(...)
    4.   └─polmineR .local(.Object, ...)
    5.     └─base::lapply(...)
    6.       └─polmineR FUN(X[[i]], ...)
    7.         ├─polmineR::get_token_stream(.Object, p_attribute = p_attr, decode = decode)
    8.         └─polmineR::get_token_stream(.Object, p_attribute = p_attr, decode = decode)
    9.           └─polmineR .local(.Object, ...)
   10.             ├─polmineR::get_token_stream(...)
   11.             └─polmineR::get_token_stream(...)
   12.               └─polmineR .local(.Object, ...)
   13.                 ├─polmineR::decode(...)
   14.                 └─polmineR::decode(...)
   15.                   └─polmineR .local(.Object, ...)
   16.                     └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_decode.R:44:5): decode subcorpus without any s-attributes ───────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument '.Object' in selecting a method for function 'decode': missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─corpus("GERMAPARLMINI") %>% subset(party == "SPD") %>% ... at test_decode.R:44:4
   2. ├─polmineR::decode(...)
   3. ├─base::subset(., party == "SPD")
   4. ├─polmineR::subset(., party == "SPD")
   5. │ └─polmineR .local(x, ...)
   6. └─base::.handleSimpleError(...)
   7.   └─base h(simpleError(msg, call))
  ── Error (test_decode.R:58:5): decode token ids ────────────────────────────────
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
      ▆
   1. ├─polmineR::decode(ids, corpus = gparl, p_attribute = "word", boost = FALSE) at test_decode.R:58:4
   2. └─polmineR::decode(ids, corpus = gparl, p_attribute = "word", boost = FALSE)
   3.   └─polmineR .local(.Object, ...)
   4.     └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_dispersion.R:8:5): dispersion ───────────────────────────────────
  Error in `if (.Object@encoding != localeToCharset()[1]) avs <- as.nativeEnc(avs, 
      from = .Object@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─polmineR::dispersion(...) at test_dispersion.R:8:4
    2. └─polmineR::dispersion(...)
    3.   └─polmineR .local(.Object, ...)
    4.     ├─polmineR::dispersion(...)
    5.     └─polmineR::dispersion(...)
    6.       └─polmineR .local(.Object, ...)
    7.         ├─polmineR::dispersion(...)
    8.         └─polmineR::dispersion(...)
    9.           └─polmineR .local(.Object, ...)
   10.             ├─polmineR::s_attributes(source, s_attribute = s_attribute, unique = TRUE)
   11.             └─polmineR::s_attributes(source, s_attribute = s_attribute, unique = TRUE)
   12.               └─polmineR .local(.Object, ...)
  ── Error (test_dispersion.R:33:5): dispersion using multiple queries ───────────
  Error in `if (.Object@encoding != localeToCharset()[1]) avs <- as.nativeEnc(avs, 
      from = .Object@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─polmineR::dispersion(...) at test_dispersion.R:33:4
   2. └─polmineR::dispersion(...)
   3.   └─polmineR .local(.Object, ...)
   4.     ├─polmineR::dispersion(...)
   5.     └─polmineR::dispersion(...)
   6.       └─polmineR .local(.Object, ...)
   7.         ├─polmineR::s_attributes(source, s_attribute = s_attribute, unique = TRUE)
   8.         └─polmineR::s_attributes(source, s_attribute = s_attribute, unique = TRUE)
   9.           └─polmineR .local(.Object, ...)
  ── Error (test_get_token_stream.R:8:5): get_token_stream()-method - decode entire corpus ──
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─polmineR::get_token_stream("REUTERS", p_attribute = "word") at test_get_token_stream.R:8:4
    2. └─polmineR::get_token_stream("REUTERS", p_attribute = "word")
    3.   └─polmineR .local(.Object, ...)
    4.     ├─polmineR::get_token_stream(...)
    5.     └─polmineR::get_token_stream(...)
    6.       └─polmineR .local(.Object, ...)
    7.         ├─polmineR::get_token_stream(...)
    8.         └─polmineR::get_token_stream(...)
    9.           └─polmineR .local(.Object, ...)
   10.             ├─polmineR::decode(...)
   11.             └─polmineR::decode(...)
   12.               └─polmineR .local(.Object, ...)
   13.                 └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_get_token_stream.R:31:5): get_token_stream()-method for numeric input object ──
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─testthat::expect_identical(...) at test_get_token_stream.R:31:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─polmineR::get_token_stream(0:9, corpus = "GERMAPARLMINI", pAttribute = "word")
    5. └─polmineR::get_token_stream(0:9, corpus = "GERMAPARLMINI", pAttribute = "word")
    6.   └─polmineR .local(.Object, ...)
    7.     ├─polmineR::decode(...)
    8.     └─polmineR::decode(...)
    9.       └─polmineR .local(.Object, ...)
   10.         └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_get_token_stream.R:85:5): get_token_stream()-method for numeric input object with collapse ──
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─testthat::expect_identical(...) at test_get_token_stream.R:85:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─polmineR::get_token_stream(...)
    5. └─polmineR::get_token_stream(...)
    6.   └─polmineR .local(.Object, ...)
    7.     ├─polmineR::decode(...)
    8.     └─polmineR::decode(...)
    9.       └─polmineR .local(.Object, ...)
   10.         └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_get_token_stream.R:98:5): get_token_stream()-method for matrix input ──
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
      ▆
   1. ├─polmineR::get_token_stream(...) at test_get_token_stream.R:98:4
   2. └─polmineR::get_token_stream(...)
   3.   ├─polmineR::get_token_stream(cpos(.Object), ...)
   4.   └─polmineR::get_token_stream(cpos(.Object), ...)
   5.     └─polmineR .local(.Object, ...)
   6.       ├─polmineR::decode(...)
   7.       └─polmineR::decode(...)
   8.         └─polmineR .local(.Object, ...)
   9.           └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_get_token_stream.R:111:5): get_token_stream()-method - decode partition, subcorpus and subcorpus_bundle ──
  Error in `h(simpleError(msg, call))`: error in evaluating the argument '.Object' in selecting a method for function 'get_token_stream': missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─corpus("REUTERS") %>% subset(id == "127") %>% ... at test_get_token_stream.R:111:4
   2. ├─polmineR::get_token_stream(., p_attribute = "word")
   3. ├─base::subset(., id == "127")
   4. ├─polmineR::subset(., id == "127")
   5. │ └─polmineR .local(x, ...)
   6. └─base::.handleSimpleError(...)
   7.   └─base h(simpleError(msg, call))
  ── Error (test_get_token_stream.R:129:5):  ─────────────────────────────────────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'subset': missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─... %>% as("String") at test_get_token_stream.R:129:4
   2. ├─methods::as(., "String")
   3. │ └─methods:::.class1(object)
   4. ├─base::subset(., speaker == "Angela Dorothea Merkel")
   5. ├─base::subset(., date == "2009-11-10")
   6. ├─polmineR::subset(., date == "2009-11-10")
   7. │ └─polmineR .local(x, ...)
   8. └─base::.handleSimpleError(...)
   9.   └─base h(simpleError(msg, call))
  ── Error (test_get_token_stream.R:141:5): Check workflow to filter subcorpus_bundle ──
  Error in `if (.Object@encoding != localeToCharset()[1]) avs <- as.nativeEnc(avs, 
      from = .Object@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─corpus("GERMAPARLMINI") %>% ... at test_get_token_stream.R:141:4
   2. ├─polmineR::as.speeches(., s_attribute_name = "speaker", progress = FALSE)
   3. └─polmineR::as.speeches(., s_attribute_name = "speaker", progress = FALSE)
   4.   └─polmineR .local(.Object, ...)
   5.     ├─polmineR::s_attributes(...)
   6.     └─polmineR::s_attributes(...)
   7.       └─polmineR .local(.Object, ...)
  ── Error (test_get_type.R:12:5): get_type_specialized ──────────────────────────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument '.Object' in selecting a method for function 'get_type': missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test_get_type.R:12:4
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─polmineR::get_type(subset("GERMAPARLMINI", date = "2009-11-11"))
    5. ├─base::subset("GERMAPARLMINI", date = "2009-11-11")
    6. ├─polmineR::subset("GERMAPARLMINI", date = "2009-11-11")
    7. │ ├─base::subset(x = corpus(x), ...)
    8. │ └─polmineR::subset(x = corpus(x), ...)
    9. │   └─polmineR .local(x, ...)
   10. └─base::.handleSimpleError(...)
   11.   └─base h(simpleError(msg, call))
  ── Error (test_kwic.R:133:5): kwic: Apply kwic on partition_bundle ─────────────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'split': missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─... %>% split(s_attribute = "speaker") at test_kwic.R:133:4
   2. ├─base::split(., s_attribute = "speaker")
   3. ├─base::subset(., date == "2009-11-10")
   4. ├─polmineR::subset(., date == "2009-11-10")
   5. │ └─polmineR .local(x, ...)
   6. └─base::.handleSimpleError(...)
   7.   └─base h(simpleError(msg, call))
  ── Error (test_ngrams.R:38:3): ngrams - character ──────────────────────────────
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─polmineR::ngrams(o, n = 3, char = "") at test_ngrams.R:38:2
    2. └─polmineR::ngrams(o, n = 3, char = "")
    3.   └─polmineR .local(.Object, ...)
    4.     ├─polmineR::get_token_stream(...)
    5.     └─polmineR::get_token_stream(...)
    6.       └─polmineR .local(.Object, ...)
    7.         ├─polmineR::get_token_stream(...)
    8.         └─polmineR::get_token_stream(...)
    9.           └─polmineR .local(.Object, ...)
   10.             ├─polmineR::decode(...)
   11.             └─polmineR::decode(...)
   12.               └─polmineR .local(.Object, ...)
   13.                 └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_p_attributes.R:24:5): p_attributes,corpus ───────────────────────
  Error in `if (.Object@encoding != localeToCharset()[1]) {
      lexicon <- stringi::stri_encode(lexicon, from = .Object@encoding, 
          to = localeToCharset()[1])
  }`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─testthat::expect_identical(...) at test_p_attributes.R:24:4
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─polmineR::p_attributes(corpus("REUTERS"), p_attribute = "word")
   5. └─polmineR::p_attributes(corpus("REUTERS"), p_attribute = "word")
   6.   └─polmineR .local(.Object, ...)
  ── Error (test_partition_bundle.R:28:5): partition_bundle ──────────────────────
  Error in `if (localeToCharset()[1] != x@encoding) expr <- .recode_call(x = expr, 
      from = localeToCharset()[1], to = x@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─base::subset(corpus("GERMAPARLMINI"), interjection == "speech") at test_partition_bundle.R:28:4
   2. └─polmineR::subset(corpus("GERMAPARLMINI"), interjection == "speech")
   3.   └─polmineR .local(x, ...)
  ── Error (test_pmi.R:19:5): identity of phrase detection of decode-workflow and Cooccurrences workflow ──
  Error in `h(simpleError(msg, call))`: error in evaluating the argument '.Object' in selecting a method for function 'pmi': error in evaluating the argument '.Object' in selecting a method for function 'ngrams': unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─... %>% ... at test_pmi.R:19:4
    2. ├─polmineR::pmi(., observed = count("GERMAPARLMINI", p_attribute = "word"))
    3. ├─polmineR::ngrams(., n = 2L, p_attribute = "word")
    4. ├─polmineR::decode(...)
    5. ├─polmineR::decode(...)
    6. │ └─polmineR .local(.Object, ...)
    7. │   └─base::lapply(...)
    8. │     └─polmineR FUN(X[[i]], ...)
    9. │       ├─polmineR::get_token_stream(.Object, p_attribute = p_attr, decode = decode)
   10. │       └─polmineR::get_token_stream(.Object, p_attribute = p_attr, decode = decode)
   11. │         └─polmineR .local(.Object, ...)
   12. │           ├─polmineR::get_token_stream(...)
   13. │           └─polmineR::get_token_stream(...)
   14. │             └─polmineR .local(.Object, ...)
   15. │               ├─polmineR::decode(...)
   16. │               └─polmineR::decode(...)
   17. │                 └─polmineR .local(.Object, ...)
   18. │                   └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
   19. ├─base::.handleSimpleError(...)
   20. │ └─base h(simpleError(msg, call))
   21. └─base::.handleSimpleError(...)
   22.   └─base h(simpleError(msg, call))
  ── Error (test_s_attributes.R:24:5): multiple s-attributes ─────────────────────
  Error in `if (.Object@encoding != localeToCharset()[1]) avs <- as.nativeEnc(avs, 
      from = .Object@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─polmineR::s_attributes(...) at test_s_attributes.R:24:4
    2. └─polmineR::s_attributes(...)
    3.   └─polmineR .local(.Object, ...)
    4.     ├─polmineR::s_attributes(...)
    5.     └─polmineR::s_attributes(...)
    6.       └─polmineR .local(.Object, ...)
    7.         ├─data.table::data.table(...)
    8.         └─base::sapply(...)
    9.           └─base::lapply(X = X, FUN = FUN, ...)
   10.             └─polmineR FUN(X[[i]], ...)
   11.               ├─polmineR::s_attributes(.Object, s_attribute = s_attr, unique = FALSE)
   12.               └─polmineR::s_attributes(.Object, s_attribute = s_attr, unique = FALSE)
   13.                 └─polmineR .local(.Object, ...)
  ── Error (test_size.R:16:5): size of corpus, split by one s-attribute ──────────
  Error in `if (.Object@encoding != localeToCharset()[1]) avs <- as.nativeEnc(avs, 
      from = .Object@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test_size.R:16:4
    2. │ └─testthat::quasi_label(enquo(expected), expected.label, arg = "expected")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─polmineR::sAttributes("GERMAPARLMINI", "date")
    5.   ├─polmineR::s_attributes(...)
    6.   └─polmineR::s_attributes(...)
    7.     └─polmineR .local(.Object, ...)
    8.       ├─polmineR::s_attributes(...)
    9.       └─polmineR::s_attributes(...)
   10.         └─polmineR .local(.Object, ...)
  ── Error (test_subcorpus.R:10:5): generate subcorpus ───────────────────────────
  Error in `if (localeToCharset()[1] != x@encoding) expr <- .recode_call(x = expr, 
      from = localeToCharset()[1], to = x@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─base::subset(gparl, speaker == "Angela Dorothea Merkel") at test_subcorpus.R:10:4
   2. └─polmineR::subset(gparl, speaker == "Angela Dorothea Merkel")
   3.   └─polmineR .local(x, ...)
  ── Error (test_subcorpus_bundle.R:23:5): generate VCorpus from subcorpus_bundle ──
  Error in `iconv(y, from = corpus@encoding, to = localeToCharset()[1])`: unsupported conversion from 'latin1' to 'NA'
  Backtrace:
       ▆
    1. ├─partition_bundle("REUTERS", s_attribute = "id") %>% ... at test_subcorpus_bundle.R:23:4
    2. ├─tm::as.VCorpus(.)
    3. └─polmineR::as.VCorpus(.)
    4.   └─methods::as(x, "VCorpus")
    5.     └─polmineR asMethod(object)
    6.       └─base::lapply(...)
    7.         └─polmineR FUN(X[[i]], ...)
    8.           ├─polmineR::get_token_stream(p, p_attribute = "word", collapse = " ")
    9.           └─polmineR::get_token_stream(p, p_attribute = "word", collapse = " ")
   10.             └─polmineR .local(.Object, ...)
   11.               ├─methods::callNextMethod()
   12.               └─polmineR .nextMethod(.Object = .Object, p_attribute = p_attribute, collapse = collapse)
   13.                 └─polmineR .local(.Object, ...)
   14.                   ├─polmineR::get_token_stream(...)
   15.                   └─polmineR::get_token_stream(...)
   16.                     ├─polmineR::get_token_stream(cpos(.Object), ...)
   17.                     └─polmineR::get_token_stream(cpos(.Object), ...)
   18.                       └─polmineR .local(.Object, ...)
   19.                         ├─polmineR::decode(...)
   20.                         └─polmineR::decode(...)
   21.                           └─polmineR .local(.Object, ...)
   22.                             └─base::iconv(y, from = corpus@encoding, to = localeToCharset()[1])
  ── Error (test_subcorpus_bundle.R:60:5): from subcorpus to count_bundle ────────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument '.Object' in selecting a method for function 'count': error in evaluating the argument 'x' in selecting a method for function 'split': missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─... %>% count(p_attribute = "word") at test_subcorpus_bundle.R:60:4
    2. ├─polmineR::count(., p_attribute = "word")
    3. ├─base::split(., s_attribute = "speaker")
    4. ├─base::subset(., speaker %in% c("Angela Dorothea Merkel", "Hubertus Heil"))
    5. ├─polmineR::subset(...)
    6. │ └─polmineR .local(x, ...)
    7. ├─base::.handleSimpleError(...)
    8. │ └─base h(simpleError(msg, call))
    9. └─base::.handleSimpleError(...)
   10.   └─base h(simpleError(msg, call))
  ── Error (test_subcorpus_bundle.R:112:5): merge-method for subcorpus_bundle ────
  Error in `if (localeToCharset()[1] != x@encoding) expr <- .recode_call(x = expr, 
      from = localeToCharset()[1], to = x@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─corpus("GERMAPARLMINI") %>% subset(interjection == "speech") at test_subcorpus_bundle.R:112:4
   2. ├─base::subset(., interjection == "speech")
   3. └─polmineR::subset(., interjection == "speech")
   4.   └─polmineR .local(x, ...)
  ── Error (test_subcorpus_bundle.R:122:5): ngrams-method for subcorpus_bundle ───
  Error in `h(simpleError(msg, call))`: error in evaluating the argument '.Object' in selecting a method for function 'ngrams': error in evaluating the argument 'x' in selecting a method for function 'split': error in evaluating the argument 'x' in selecting a method for function 'subset': missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─... %>% ngrams(n = 2) at test_subcorpus_bundle.R:122:4
    2. ├─polmineR::ngrams(., n = 2)
    3. ├─base::split(., s_attribute = "speaker")
    4. ├─base::subset(., date == "2009-11-11")
    5. ├─base::subset(., interjection == "speech")
    6. ├─polmineR::subset(., interjection == "speech")
    7. │ └─polmineR .local(x, ...)
    8. ├─base::.handleSimpleError(...)
    9. │ └─base h(simpleError(msg, call))
   10. ├─base::.handleSimpleError(...)
   11. │ └─base h(simpleError(msg, call))
   12. └─base::.handleSimpleError(...)
   13.   └─base h(simpleError(msg, call))
  ── Error (test_subcorpus_bundle.R:140:5): split-method for subcorpus_bundle ────
  Error in `h(simpleError(msg, call))`: error in evaluating the argument 'x' in selecting a method for function 'split': error in evaluating the argument 'x' in selecting a method for function 'split': missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─... %>% split(s_attribute = "speaker") at test_subcorpus_bundle.R:140:4
    2. ├─base::split(., s_attribute = "speaker")
    3. ├─base::split(., s_attribute = "date")
    4. ├─base::subset(., interjection == "speech")
    5. ├─polmineR::subset(., interjection == "speech")
    6. │ └─polmineR .local(x, ...)
    7. ├─base::.handleSimpleError(...)
    8. │ └─base h(simpleError(msg, call))
    9. └─base::.handleSimpleError(...)
   10.   └─base h(simpleError(msg, call))
  ── Error (test_summary.R:29:5): summary,count-method ───────────────────────────
  Error in `if (localeToCharset()[1] != x@encoding) expr <- .recode_call(x = expr, 
      from = localeToCharset()[1], to = x@encoding)`: missing value where TRUE/FALSE needed
  Backtrace:
      ▆
   1. ├─base::subset(corp, date == "2009-11-11") at test_summary.R:29:4
   2. └─polmineR::subset(corp, date == "2009-11-11")
   3.   └─polmineR .local(x, ...)
  
  [ FAIL 45 | WARN 11 | SKIP 7 | PASS 298 ]
  Error: Test failures
  Execution halted