Running ‘testhat.R’ [6s/22s]
Running the tests in ‘tests/testhat.R’ failed.
Complete output:
  > if (packageVersion("testthat") >= "0.7.1.99") {
  +     library(testthat)  
  +     test_check("mlvocab")
  + }
  Loading required package: mlvocab
  Loading required package: Rcpp
  Loading required package: Matrix
  Loading required package: digest
  Loading required package: sparsepp
  ── 1. Error: dtm output type is correct (@test_term_matrices.R#144)  ───────────
  Internal error: Incomplete compactification (ncompacted: 4, npris: 2)
  1: dtm(corpus, vocab, output = "tri") at testthat/test_term_matrices.R:144
  2: tm(C_dtm, corpus, vocab, ngram, nbuckets, output)
  3: do.call(cfun, list(corpus, vocab, NULL, nbuckets, output, ..., ngram_min = ngram[[1]], 
         ngram_max = ngram[[2]]))
  4: (function (corpus0, vocabdf, term_weights, nbuckets, output, ngram_min, ngram_max) 
     {
         .Call(`_mlvocab_C_dtm`, corpus0, vocabdf, term_weights, nbuckets, output, ngram_min, 
             ngram_max)
     })(list(a = c("The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"
     ), b = c("the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog", "the", 
     "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog")), structure(list(
         term = c("the", "quick", "brown", "fox", "jumps", "over", "lazy", "dog", "The"
         ), term_count = c(5L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L), doc_count = c(2L, 2L, 
         2L, 2L, 2L, 2L, 2L, 2L, 1L)), class = c("mlvocab_vocab", "data.frame"), row.names = c(NA, 
     -9L), ngram = c(1L, 1L), document_count = 2L, nbuckets = 0L, ngram_sep = "_", regex = "[[:space:]]+"), 
         NULL, 0L, "triplet", ngram_min = 1L, ngram_max = 1L)
  
  ── 2. Error: dtm works with NULL names (@test_term_matrices.R#167)  ────────────
  Internal error: Incomplete compactification (ncompacted: 4, npris: 2)
  1: dtm(corpus, v, output = "triplet") at testthat/test_term_matrices.R:167
  2: tm(C_dtm, corpus, vocab, ngram, nbuckets, output)
  3: do.call(cfun, list(corpus, vocab, NULL, nbuckets, output, ..., ngram_min = ngram[[1]], 
         ngram_max = ngram[[2]]))
  4: (function (corpus0, vocabdf, term_weights, nbuckets, output, ngram_min, ngram_max) 
     {
         .Call(`_mlvocab_C_dtm`, corpus0, vocabdf, term_weights, nbuckets, output, ngram_min, 
             ngram_max)
     })(list(c("The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"), 
         c("the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog", "the", 
         "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog")), structure(list(
         term = c("the", "quick", "brown", "fox", "jumps", "over", "lazy", "dog", "The"
         ), term_count = c(5L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L), doc_count = c(2L, 2L, 
         2L, 2L, 2L, 2L, 2L, 2L, 1L)), class = c("mlvocab_vocab", "data.frame"), row.names = c(NA, 
     -9L), ngram = c(1L, 1L), document_count = 2L, nbuckets = 0L, ngram_sep = "_", regex = "[[:space:]]+"), 
         NULL, 0L, "triplet", ngram_min = 1L, ngram_max = 1L)
  
  ── 3. Error: tdm works (@test_term_matrices.R#188)  ────────────────────────────
  Internal error: Incomplete compactification (ncompacted: 4, npris: 2)
  1: tdm(corpus, v, output = "tri") at testthat/test_term_matrices.R:188
  2: tm(C_tdm, corpus, vocab, ngram, nbuckets, output)
  3: do.call(cfun, list(corpus, vocab, NULL, nbuckets, output, ..., ngram_min = ngram[[1]], 
         ngram_max = ngram[[2]]))
  4: (function (corpus0, vocabdf, term_weights, nbuckets, output, ngram_min, ngram_max) 
     {
         .Call(`_mlvocab_C_tdm`, corpus0, vocabdf, term_weights, nbuckets, output, ngram_min, 
             ngram_max)
     })(list(a = c("The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"
     ), b = c("the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog", "the", 
     "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog")), structure(list(
         term = c("the", "quick", "brown", "fox", "jumps", "over", "lazy", "dog", "The"
         ), term_count = c(5L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L), doc_count = c(2L, 2L, 
         2L, 2L, 2L, 2L, 2L, 2L, 1L)), class = c("mlvocab_vocab", "data.frame"), row.names = c(NA, 
     -9L), ngram = c(1L, 1L), document_count = 2L, nbuckets = 0L, ngram_sep = "_", regex = "[[:space:]]+"), 
         NULL, 0L, "triplet", ngram_min = 1L, ngram_max = 1L)
  
  
   *** caught segfault ***
  address 419e7258, cause 'memory not mapped'
  
  Traceback:
   1: (function (corpus0, vocabdf, term_weights, nbuckets, output,     ngram_min, ngram_max) {    .Call(`_mlvocab_C_tdm`, corpus0, vocabdf, term_weights, nbuckets,         output, ngram_min, ngram_max)})(list(c("The", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog"), c("the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog", "the", "quick", "brown", "fox", "jumps", "over", "the", "lazy", "dog")), list(term = c("the", "quick", "brown", "fox", "jumps", "over", "lazy", "dog", "The"), term_count = c(5L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 1L), doc_count = c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L)), NULL, 0L, "triplet", ngram_min = 1L, ngram_max = 1L)
   2: do.call(cfun, list(corpus, vocab, NULL, nbuckets, output, ...,     ngram_min = ngram[[1]], ngram_max = ngram[[2]]))
   3: tm(C_tdm, corpus, vocab, ngram, nbuckets, output)
   4: tdm(corpus, v, output = "triplet")
   5: eval(code, test_env)
   6: eval(code, test_env)
   7: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
   8: doTryCatch(return(expr), name, parentenv, handler)
   9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  11: doTryCatch(return(expr), name, parentenv, handler)
  12: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  15: test_code(desc, code, env = parent.frame())
  16: test_that("tdm works with NULL names", {    names(corpus) <- NULL    mat <- t(mat)    colnames(mat) <- NULL    tdm <- tdm(corpus, v, output = "triplet")    expect_s4_class(tdm, "dgTMatrix")    expect_equal(dim(tdm), dim(mat))    expect_equal(as.matrix(tdm), mat)    tdm <- tdm(corpus, v, output = "column")    expect_s4_class(tdm, "dgCMatrix")    expect_equal(dim(tdm), dim(mat))    expect_equal(as.matrix(tdm), mat)    tdm <- tdm(corpus, v, output = "row")    expect_s4_class(tdm, "dgRMatrix")    expect_equal(dim(tdm), dim(mat))    expect_equal(as.matrix(tdm), mat)})
  17: eval(code, test_env)
  18: eval(code, test_env)
  19: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  20: doTryCatch(return(expr), name, parentenv, handler)
  21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  22: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  23: doTryCatch(return(expr), name, parentenv, handler)
  24: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  25: tryCatchList(expr, classes, parentenv, handlers)
  26: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  27: test_code(NULL, exprs, env)
  28: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  29: force(code)
  30: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        end_context()    })
  31: FUN(X[[i]], ...)
  32: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  33: force(code)
  34: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  35: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  36: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  37: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  38: test_check("mlvocab")
  An irrecoverable exception occurred. R is aborting now ...