Running ‘testthat.R’ [21s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("qdap")
  Loading required package: qdapDictionaries
  Loading required package: qdapRegex
  Loading required package: qdapTools
  Loading required package: RColorBrewer
  
  Attaching package: 'qdap'
  
  The following object is masked from 'package:testthat':
  
      %>%
  
  The following object is masked from 'package:base':
  
      Filter
  
  > 
  > 
  > test_check("qdap")
  ── 1. Error: adjacency_matrix gives desired output (@test-adjacency_matrix.R#6) 
  the condition has length > 1
  1: with(DATA, termco(state, list(sex, adult), words)) at testthat/test-adjacency_matrix.R:6
  2: with.default(DATA, termco(state, list(sex, adult), words))
  3: eval(substitute(expr), data, enclos = parent.frame())
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: termco(state, list(sex, adult), words)
  6: termco_d(text.var = text.var, grouping.var = grouping.var, match.string = ML, ignore.case = ignore.case, 
         percent = percent, apostrophe.remove = apostrophe.remove, char.keep = char.keep, 
         digit.remove = FALSE, digits = digits, zero.replace = zero.replace, ...)
  7: termco.h(text.var = strip(text.var, lower.case = FALSE, char.keep = char.keep, digit.remove = digit.remove, 
         apostrophe.remove = apostrophe.remove, ...), match.string = match.string, grouping.var = grouping.var, 
         ignore.case = ignore.case)
  8: lapply(text.var, function(x) term.count(tolower(x), mat = tolower(match.string)))
  9: FUN(X[[i]], ...)
  10: term.count(tolower(x), mat = tolower(match.string))
  11: sapply(mat, function(x) tester(x, str))
  12: lapply(X = X, FUN = FUN, ...)
  13: FUN(X[[i]], ...)
  14: tester(x, str)
  15: suppressWarnings(if (is.na(str) | length(p) == 1 & p < 1) {
         0
     } else {
         length(p)
     })
  16: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  
  ── 2. Error: apply_as_df allows users to apply data.frame based functions to a C
  the condition has length > 1
  1: apply_as_df(reuters, termco, match.list = matches) at testthat/test-as.tdm.R:80
  2: with(dat, qdapfun(text.var = text, grouping.var = doc_id, ...))
  3: with.default(dat, qdapfun(text.var = text, grouping.var = doc_id, ...))
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: eval(substitute(expr), data, enclos = parent.frame())
  6: qdapfun(text.var = text, grouping.var = doc_id, ...)
  7: termco_d(text.var = text.var, grouping.var = grouping.var, match.string = ML, ignore.case = ignore.case, 
         percent = percent, apostrophe.remove = apostrophe.remove, char.keep = char.keep, 
         digit.remove = FALSE, digits = digits, zero.replace = zero.replace, ...)
  8: termco.h(text.var = strip(text.var, lower.case = FALSE, char.keep = char.keep, digit.remove = digit.remove, 
         apostrophe.remove = apostrophe.remove, ...), match.string = match.string, grouping.var = grouping.var, 
         ignore.case = ignore.case)
  9: lapply(text.var, function(x) term.count(tolower(x), mat = tolower(match.string)))
  10: FUN(X[[i]], ...)
  11: term.count(tolower(x), mat = tolower(match.string))
  12: sapply(mat, function(x) tester(x, str))
  13: lapply(X = X, FUN = FUN, ...)
  14: FUN(X[[i]], ...)
  15: tester(x, str)
  16: suppressWarnings(if (is.na(str) | length(p) == 1 & p < 1) {
         0
     } else {
         length(p)
     })
  17: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  
  ── 3. Error: cm_2long gives the desired output for time spans (@test-cm_2long.R#
  the condition has length > 1
  1: cm_time2long(object = list(bar1 = bar1)) at testthat/test-cm_2long.R:107
  2: suppressMessages(lapply(L1, function(x) {
         cm_debug(x)
     }))
  3: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  4: lapply(L1, function(x) {
         cm_debug(x)
     })
  5: FUN(X[[i]], ...)
  6: cm_debug(x)
  7: unlist(lapply(cm.list.obj, debug), recursive = FALSE)
  8: lapply(cm.list.obj, debug)
  9: FUN(X[[i]], ...)
  10: sapply(string, tester, x = ".")
  11: lapply(X = X, FUN = FUN, ...)
  12: FUN(X[[i]], ...)
  13: suppressWarnings(if (is.na(p) | length(p) == 1 & p < 1) {
         0
     } else {
         length(p)
     })
  14: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  
  ── 4. Error: cm_code.blank, gives the desired output (@test-cm_code.blank.R#101)
  the condition has length > 1
  1: cm_time2long(v.name = "time", object = list(x = x, y = y)) at testthat/test-cm_code.blank.R:101
  2: suppressMessages(lapply(L1, function(x) {
         cm_debug(x)
     }))
  3: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  4: lapply(L1, function(x) {
         cm_debug(x)
     })
  5: FUN(X[[i]], ...)
  6: cm_debug(x)
  7: unlist(lapply(cm.list.obj, debug), recursive = FALSE)
  8: lapply(cm.list.obj, debug)
  9: FUN(X[[i]], ...)
  10: sapply(string, tester, x = ".")
  11: lapply(X = X, FUN = FUN, ...)
  12: FUN(X[[i]], ...)
  13: suppressWarnings(if (is.na(p) | length(p) == 1 & p < 1) {
         0
     } else {
         length(p)
     })
  14: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======                                                                |   9%
    |                                                                            
    |=============                                                         |  18%
    |                                                                            
    |===================                                                   |  27%
    |                                                                            
    |=========================                                             |  36%
    |                                                                            
    |================================                                      |  45%
    |                                                                            
    |======================================                                |  55%
    |                                                                            
    |=============================================                         |  64%
    |                                                                            
    |===================================================                   |  73%
    |                                                                            
    |=========================================================             |  82%
    |                                                                            
    |================================================================      |  91%
    |                                                                            
    |======================================================================| 100%
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======                                                                |   9%
    |                                                                            
    |=============                                                         |  18%
    |                                                                            
    |===================                                                   |  27%
    |                                                                            
    |=========================                                             |  36%
    |                                                                            
    |================================                                      |  45%
    |                                                                            
    |======================================                                |  55%
    |                                                                            
    |=============================================                         |  64%
    |                                                                            
    |===================================================                   |  73%
    |                                                                            
    |=========================================================             |  82%
    |                                                                            
    |================================================================      |  91%
    |                                                                            
    |======================================================================| 100%
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 202 SKIPPED: 0 FAILED: 4
  1. Error: adjacency_matrix gives desired output (@test-adjacency_matrix.R#6) 
  2. Error: apply_as_df allows users to apply data.frame based functions to a Corpus (@test-as.tdm.R#80) 
  3. Error: cm_2long gives the desired output for time spans (@test-cm_2long.R#107) 
  4. Error: cm_code.blank, gives the desired output (@test-cm_code.blank.R#101) 
  
  Error: testthat unit tests failed
  Execution halted