Running ‘testthat.R’ [32s/32s]
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: as.tdm, as.dtm, as.DocumentTermMatrix, and as.TermDocumentMatrix 
      convert wfm, character and existing TermDocumentMatrix/DocumentTermMatrix (@test-as.tdm.R#7) 
  all(!is.na(match(c("doc_id", "text"), names(x)))) is not TRUE
  1: expect_true(inherits(as.dtm(DATA$state, DATA$person), "DocumentTermMatrix")) at testthat/test-as.tdm.R:7
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: inherits(as.dtm(DATA$state, DATA$person), "DocumentTermMatrix")
  7: as.dtm(DATA$state, DATA$person)
  8: as.dtm.character(DATA$state, DATA$person)
  9: tm_dtm_interface2(text.var = text.var, grouping.var = grouping.var, ...)
  10: replace_ids(tm::Corpus(tm::DataframeSource(LST_DF)), LST_DF[["id"]])
  11: stopifnot(length(corpus$content) == length(ids))
  12: tm::Corpus(tm::DataframeSource(LST_DF))
  13: stopifnot(inherits(x, "Source"))
  14: inherits(x, "Source")
  15: tm::DataframeSource(LST_DF)
  16: stopifnot(all(!is.na(match(c("doc_id", "text"), names(x)))))
  17: stop(msg, call. = FALSE, domain = NA)
  
  2. Error: apply_as_tm applies tm functions and then optionally converts back (@test-as.tdm.R#25) 
  all(!is.na(match(c("doc_id", "text"), names(x)))) is not TRUE
  1: with(DATA, wfm(state, list(sex, adult))) at testthat/test-as.tdm.R:25
  2: with.default(DATA, wfm(state, list(sex, adult)))
  3: eval(substitute(expr), data, enclos = parent.frame())
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: wfm(state, list(sex, adult))
  6: wfm.character(state, list(sex, adult))
  7: tm_tdm_interface(text.var = text.var, grouping.var = grouping.var, output = output, 
         stopwords = stopwords, char2space = char2space, ...)
  8: replace_ids(tm::Corpus(tm::DataframeSource(LST_DF)), LST_DF[["id"]])
  9: stopifnot(length(corpus$content) == length(ids))
  10: tm::Corpus(tm::DataframeSource(LST_DF))
  11: stopifnot(inherits(x, "Source"))
  12: inherits(x, "Source")
  13: tm::DataframeSource(LST_DF)
  14: stopifnot(all(!is.na(match(c("doc_id", "text"), names(x)))))
  15: stop(msg, call. = FALSE, domain = NA)
  
  3. Error: as.Corpus and as.data.frame methods work to convert between qadp/tm (@test-as.tdm.R#55) 
  all(!is.na(match(c("doc_id", "text"), names(x)))) is not TRUE
  1: as.Corpus(DATA$state, DATA$person, demographic = DATA[, qcv(sex, adult, code)]) at testthat/test-as.tdm.R:55
  2: as.Corpus.default(DATA$state, DATA$person, demographic = DATA[, qcv(sex, adult, code)])
  3: replace_ids(tm::Corpus(tm::DataframeSource(LST_DF)), LST_DF[["id"]])
  4: stopifnot(length(corpus$content) == length(ids))
  5: tm::Corpus(tm::DataframeSource(LST_DF))
  6: stopifnot(inherits(x, "Source"))
  7: inherits(x, "Source")
  8: tm::DataframeSource(LST_DF)
  9: stopifnot(all(!is.na(match(c("doc_id", "text"), names(x)))))
  10: stop(msg, call. = FALSE, domain = NA)
  
  4. Error: apply_as_df allows users to apply data.frame based functions to a Corpus (@test-as.tdm.R#77) 
  all(!is.na(match(c("doc_id", "text"), names(x)))) is not TRUE
  1: apply_as_df(reuters, Dissimilarity) at testthat/test-as.tdm.R:77
  2: with(dat, qdapfun(text.var = text, grouping.var = docs, ...))
  3: with.default(dat, qdapfun(text.var = text, grouping.var = docs, ...))
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: eval(substitute(expr), data, enclos = parent.frame())
  6: qdapfun(text.var = text, grouping.var = docs, ...)
  7: wfm(text.var = text.var, grouping.var = grouping.var, ...)
  8: wfm.character(text.var = text.var, grouping.var = grouping.var, ...)
  9: tm_tdm_interface(text.var = text.var, grouping.var = grouping.var, output = output, 
         stopwords = stopwords, char2space = char2space, ...)
  10: replace_ids(tm::Corpus(tm::DataframeSource(LST_DF)), LST_DF[["id"]])
  11: stopifnot(length(corpus$content) == length(ids))
  12: tm::Corpus(tm::DataframeSource(LST_DF))
  13: stopifnot(inherits(x, "Source"))
  14: inherits(x, "Source")
  15: tm::DataframeSource(LST_DF)
  16: stopifnot(all(!is.na(match(c("doc_id", "text"), names(x)))))
  17: stop(msg, call. = FALSE, domain = NA)
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======                                                                |   9%
    |                                                                            
    |=============                                                         |  18%
    |                                                                            
    |===================                                                   |  27%
    |                                                                            
    |=========================                                             |  36%
    |                                                                            
    |================================                                      |  45%
    |                                                                            
    |======================================                                |  55%
    |                                                                            
    |=============================================                         |  64%
    |                                                                            
    |===================================================                   |  73%
    |                                                                            
    |=========================================================             |  82%
    |                                                                            
    |================================================================      |  91%
    |                                                                            
    |======================================================================| 100%
  5. Error: phrase_net gives a `phrase_net` and `igraph` object (@test-phrase_net.R#19) 
  all(!is.na(match(c("doc_id", "text"), names(x)))) is not TRUE
  1: phrase_net(sents, r = 0.5) at testthat/test-phrase_net.R:19
  2: word_cor(text.var[["text"]], text.var[["tot"]], word = Filtered_dat[[1]], r = NULL)
  3: t(wfm(text.var = text.var, grouping.var = grouping.var, ...))
  4: wfm(text.var = text.var, grouping.var = grouping.var, ...)
  5: wfm.character(text.var = text.var, grouping.var = grouping.var, ...)
  6: tm_tdm_interface(text.var = text.var, grouping.var = grouping.var, output = output, 
         stopwords = stopwords, char2space = char2space, ...)
  7: replace_ids(tm::Corpus(tm::DataframeSource(LST_DF)), LST_DF[["id"]])
  8: stopifnot(length(corpus$content) == length(ids))
  9: tm::Corpus(tm::DataframeSource(LST_DF))
  10: stopifnot(inherits(x, "Source"))
  11: inherits(x, "Source")
  12: tm::DataframeSource(LST_DF)
  13: stopifnot(all(!is.na(match(c("doc_id", "text"), names(x)))))
  14: stop(msg, call. = FALSE, domain = NA)
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======                                                                |   9%
    |                                                                            
    |=============                                                         |  18%
    |                                                                            
    |===================                                                   |  27%
    |                                                                            
    |=========================                                             |  36%
    |                                                                            
    |================================                                      |  45%
    |                                                                            
    |======================================                                |  55%
    |                                                                            
    |=============================================                         |  64%
    |                                                                            
    |===================================================                   |  73%
    |                                                                            
    |=========================================================             |  82%
    |                                                                            
    |================================================================      |  91%
    |                                                                            
    |======================================================================| 100%
  6. Error: wfm out puts a matrix with appropriate attributes (@test-wfm.R#6) ----
  all(!is.na(match(c("doc_id", "text"), names(x)))) is not TRUE
  1: with(DATA, wfm(state, list(sex, adult))) at testthat/test-wfm.R:6
  2: with.default(DATA, wfm(state, list(sex, adult)))
  3: eval(substitute(expr), data, enclos = parent.frame())
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: wfm(state, list(sex, adult))
  6: wfm.character(state, list(sex, adult))
  7: tm_tdm_interface(text.var = text.var, grouping.var = grouping.var, output = output, 
         stopwords = stopwords, char2space = char2space, ...)
  8: replace_ids(tm::Corpus(tm::DataframeSource(LST_DF)), LST_DF[["id"]])
  9: stopifnot(length(corpus$content) == length(ids))
  10: tm::Corpus(tm::DataframeSource(LST_DF))
  11: stopifnot(inherits(x, "Source"))
  12: inherits(x, "Source")
  13: tm::DataframeSource(LST_DF)
  14: stopifnot(all(!is.na(match(c("doc_id", "text"), names(x)))))
  15: stop(msg, call. = FALSE, domain = NA)
  
  7. Error: wfm_expanded expands (@test-wfm.R#64) --------------------------------
  all(!is.na(match(c("doc_id", "text"), names(x)))) is not TRUE
  1: expect_true(all(rownames(wfm_expanded(wfm(DATA$state, DATA$person)))[49:50] == "you")) at testthat/test-wfm.R:64
  2: expect(identical(as.vector(object), TRUE), sprintf("%s isn't true.", lab), info = info)
  3: as.expectation(exp, ..., srcref = srcref)
  4: identical(as.vector(object), TRUE)
  5: as.vector(object)
  6: rownames(wfm_expanded(wfm(DATA$state, DATA$person)))
  7: wfm_expanded(wfm(DATA$state, DATA$person))
  8: methods::is(text.var, "true.matrix")
  9: wfm(DATA$state, DATA$person)
  10: wfm.character(DATA$state, DATA$person)
  11: tm_tdm_interface(text.var = text.var, grouping.var = grouping.var, output = output, 
         stopwords = stopwords, char2space = char2space, ...)
  12: replace_ids(tm::Corpus(tm::DataframeSource(LST_DF)), LST_DF[["id"]])
  13: stopifnot(length(corpus$content) == length(ids))
  14: tm::Corpus(tm::DataframeSource(LST_DF))
  15: stopifnot(inherits(x, "Source"))
  16: inherits(x, "Source")
  17: tm::DataframeSource(LST_DF)
  18: stopifnot(all(!is.na(match(c("doc_id", "text"), names(x)))))
  19: stop(msg, call. = FALSE, domain = NA)
  
  8. Error: wf_combine combines (@test-wfm.R#74) ---------------------------------
  all(!is.na(match(c("doc_id", "text"), names(x)))) is not TRUE
  1: wfm(DATA$state, DATA$person) at testthat/test-wfm.R:74
  2: wfm.character(DATA$state, DATA$person)
  3: tm_tdm_interface(text.var = text.var, grouping.var = grouping.var, output = output, 
         stopwords = stopwords, char2space = char2space, ...)
  4: replace_ids(tm::Corpus(tm::DataframeSource(LST_DF)), LST_DF[["id"]])
  5: stopifnot(length(corpus$content) == length(ids))
  6: tm::Corpus(tm::DataframeSource(LST_DF))
  7: stopifnot(inherits(x, "Source"))
  8: inherits(x, "Source")
  9: tm::DataframeSource(LST_DF)
  10: stopifnot(all(!is.na(match(c("doc_id", "text"), names(x)))))
  11: stop(msg, call. = FALSE, domain = NA)
  
  9. Error: weight produces matrices of the right class with right attributes (@test-wfm.R#156) 
  all(!is.na(match(c("doc_id", "text"), names(x)))) is not TRUE
  1: with(DATA, wfm(state, list(sex, adult))) at testthat/test-wfm.R:156
  2: with.default(DATA, wfm(state, list(sex, adult)))
  3: eval(substitute(expr), data, enclos = parent.frame())
  4: eval(substitute(expr), data, enclos = parent.frame())
  5: wfm(state, list(sex, adult))
  6: wfm.character(state, list(sex, adult))
  7: tm_tdm_interface(text.var = text.var, grouping.var = grouping.var, output = output, 
         stopwords = stopwords, char2space = char2space, ...)
  8: replace_ids(tm::Corpus(tm::DataframeSource(LST_DF)), LST_DF[["id"]])
  9: stopifnot(length(corpus$content) == length(ids))
  10: tm::Corpus(tm::DataframeSource(LST_DF))
  11: stopifnot(inherits(x, "Source"))
  12: inherits(x, "Source")
  13: tm::DataframeSource(LST_DF)
  14: stopifnot(all(!is.na(match(c("doc_id", "text"), names(x)))))
  15: stop(msg, call. = FALSE, domain = NA)
  
  testthat results ================================================================
  OK: 189 SKIPPED: 0 FAILED: 9
  1. Error: as.tdm, as.dtm, as.DocumentTermMatrix, and as.TermDocumentMatrix 
      convert wfm, character and existing TermDocumentMatrix/DocumentTermMatrix (@test-as.tdm.R#7) 
  2. Error: apply_as_tm applies tm functions and then optionally converts back (@test-as.tdm.R#25) 
  3. Error: as.Corpus and as.data.frame methods work to convert between qadp/tm (@test-as.tdm.R#55) 
  4. Error: apply_as_df allows users to apply data.frame based functions to a Corpus (@test-as.tdm.R#77) 
  5. Error: phrase_net gives a `phrase_net` and `igraph` object (@test-phrase_net.R#19) 
  6. Error: wfm out puts a matrix with appropriate attributes (@test-wfm.R#6) 
  7. Error: wfm_expanded expands (@test-wfm.R#64) 
  8. Error: wf_combine combines (@test-wfm.R#74) 
  9. Error: weight produces matrices of the right class with right attributes (@test-wfm.R#156) 
  
  Error: testthat unit tests failed
  Execution halted