Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(widyr)
  > 
  > test_check("widyr")
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-pairwise-cor.R:10:3): pairwise_cor computes pairwise correlations ──
  Error: there is no package called 'tokenizers'
  Backtrace:
       █
    1. ├─d %>% pairwise_cor(col, row, value) test-pairwise-cor.R:10:2
    2. ├─widyr::pairwise_cor(., col, row, value)
    3. │ └─widyr::pairwise_cor_(...)
    4. │   └─tbl %>% ungroup() %>% cor_func(item, feature, value) %>% rename(correlation = value)
    5. ├─dplyr::rename(., correlation = value)
    6. ├─widyr:::cor_func(., item, feature, value)
    7. │ └─widyr:::new_f(tbl, item, feature, value, ...)
    8. └─base::loadNamespace(x)
    9.   ├─base::namespaceImport(...)
   10.   └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.     └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.       └─base:::withOneRestart(expr, restarts[[1L]])
   13.         └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-pairwise-cor.R:23:3): pairwise_cor can compute Spearman correlations ──
  Error: there is no package called 'stringr'
  Backtrace:
       █
    1. ├─d %>% pairwise_cor(col, row, value, method = "spearman") test-pairwise-cor.R:23:2
    2. ├─widyr::pairwise_cor(., col, row, value, method = "spearman")
    3. │ └─widyr::pairwise_cor_(...)
    4. │   └─tbl %>% ungroup() %>% cor_func(item, feature, value) %>% rename(correlation = value)
    5. ├─dplyr::rename(., correlation = value)
    6. ├─widyr:::cor_func(., item, feature, value)
    7. │ └─widyr:::new_f(tbl, item, feature, value, ...)
    8. └─base::loadNamespace(x)
    9.   ├─base::namespaceImport(...)
   10.   └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.     └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.       └─base:::withOneRestart(expr, restarts[[1L]])
   13.         └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-pairwise-cor.R:31:3): pairwise_cor works on binary matrices ─────
  Error: there is no package called 'tokenizers'
  Backtrace:
       █
    1. ├─`%>%`(...) test-pairwise-cor.R:31:2
    2. ├─widyr::pairwise_cor(., x, y, sort = TRUE)
    3. │ └─widyr::pairwise_cor_(...)
    4. │   └─tbl %>% ungroup() %>% cor_func(item, feature, value) %>% rename(correlation = value)
    5. ├─dplyr::rename(., correlation = value)
    6. ├─widyr:::cor_func(., item, feature, value)
    7. │ └─widyr:::new_f(tbl, item, feature, value, ...)
    8. └─base::loadNamespace(x)
    9.   ├─base::namespaceImport(...)
   10.   └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.     └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.       └─base:::withOneRestart(expr, restarts[[1L]])
   13.         └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-pairwise-cor.R:42:3): pairwise_cor retains factor levels ────────
  Error: there is no package called 'stringr'
  Backtrace:
       █
    1. ├─d %>% pairwise_cor(col, row, value, method = "spearman") test-pairwise-cor.R:42:2
    2. ├─widyr::pairwise_cor(., col, row, value, method = "spearman")
    3. │ └─widyr::pairwise_cor_(...)
    4. │   └─tbl %>% ungroup() %>% cor_func(item, feature, value) %>% rename(correlation = value)
    5. ├─dplyr::rename(., correlation = value)
    6. ├─widyr:::cor_func(., item, feature, value)
    7. │ └─widyr:::new_f(tbl, item, feature, value, ...)
    8. └─base::loadNamespace(x)
    9.   ├─base::namespaceImport(...)
   10.   └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.     └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.       └─base:::withOneRestart(expr, restarts[[1L]])
   13.         └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-pairwise-count.R:6:1): (code run outside of `test_that()`) ──────
  Error: package or namespace load failed for 'tidytext' in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
   there is no package called 'tokenizers'
  Backtrace:
      █
   1. ├─base::suppressPackageStartupMessages(library(tidytext)) test-pairwise-count.R:6:0
   2. │ └─base::withCallingHandlers(expr, packageStartupMessage = function(c) tryInvokeRestart("muffleMessage"))
   3. └─base::library(tidytext)
   4.   └─base::tryCatch(...)
   5.     └─base:::tryCatchList(expr, classes, parentenv, handlers)
   6.       └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   7.         └─value[[3L]](cond)
  ── Error (test-pairwise-dist.R:10:3): pairwise_dist computes a distance matrix ──
  Error: there is no package called 'stringr'
  Backtrace:
       █
    1. ├─d %>% pairwise_dist(col, row, value) test-pairwise-dist.R:10:2
    2. ├─widyr::pairwise_dist(., col, row, value)
    3. │ └─widyr::pairwise_dist_(...)
    4. │   └─tbl %>% d_func(item, feature, value) %>% rename(distance = value)
    5. ├─dplyr::rename(., distance = value)
    6. ├─widyr:::d_func(., item, feature, value)
    7. │ └─widyr:::new_f(tbl, item, feature, value, ...)
    8. └─base::loadNamespace(x)
    9.   ├─base::namespaceImport(...)
   10.   └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.     └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.       └─base:::withOneRestart(expr, restarts[[1L]])
   13.         └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-pairwise-similarity.R:14:3): pairwise_similarity computes pairwise cosine similarity ──
  Error: there is no package called 'tokenizers'
  Backtrace:
       █
    1. ├─d %>% pairwise_similarity(col, row, value) test-pairwise-similarity.R:14:2
    2. ├─widyr::pairwise_similarity(., col, row, value)
    3. │ └─widyr::pairwise_similarity_(...)
    4. │   └─tbl %>% d_func(item, feature, value) %>% rename(similarity = value)
    5. ├─dplyr::rename(., similarity = value)
    6. ├─widyr:::d_func(., item, feature, value)
    7. │ └─widyr:::new_f(tbl, item, feature, value, ...)
    8. └─base::loadNamespace(x)
    9.   ├─base::namespaceImport(...)
   10.   └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.     └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.       └─base:::withOneRestart(expr, restarts[[1L]])
   13.         └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-pairwise-similarity.R:29:3): pairwise_similarity retains factor levels ──
  Error: there is no package called 'tokenizers'
  Backtrace:
       █
    1. ├─d %>% pairwise_similarity(col, row, value) test-pairwise-similarity.R:29:2
    2. ├─widyr::pairwise_similarity(., col, row, value)
    3. │ └─widyr::pairwise_similarity_(...)
    4. │   └─tbl %>% d_func(item, feature, value) %>% rename(similarity = value)
    5. ├─dplyr::rename(., similarity = value)
    6. ├─widyr:::d_func(., item, feature, value)
    7. │ └─widyr:::new_f(tbl, item, feature, value, ...)
    8. └─base::loadNamespace(x)
    9.   ├─base::namespaceImport(...)
   10.   └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   11.     └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   12.       └─base:::withOneRestart(expr, restarts[[1L]])
   13.         └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-squarely.R:9:5): Can perform 'squarely' operations on pairs of items ──
  Error: there is no package called 'stringr'
  Backtrace:
       █
    1. ├─gapminder %>% squarely(dist)(country, year, lifeExp) test-squarely.R:9:4
    2. ├─squarely(dist)(., country, year, lifeExp)
    3. │ └─widyr:::inner_func(...)
    4. │   └─widyr:::new_f(tbl, item, feature, value, ...)
    5. └─base::loadNamespace(x)
    6.   ├─base::namespaceImport(...)
    7.   └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
    8.     └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
    9.       └─base:::withOneRestart(expr, restarts[[1L]])
   10.         └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-squarely.R:20:5): Can perform 'squarely' within groups ──────────
  Error: Problem with `mutate()` column `data`.
  ℹ `data = purrr::map(data, f, item, feature, value)`.
  ✖ there is no package called 'stringr'
  ℹ The error occurred in group 1: continent = Africa.
  Backtrace:
       █
    1. ├─`%>%`(...) test-squarely.R:20:4
    2. ├─squarely(dist)(., country, year, lifeExp)
    3. │ └─widyr:::inner_func(...)
    4. │   └─`%>%`(...)
    5. ├─dplyr::group_by_at(., dplyr::group_vars(tbl))
    6. │ └─dplyr:::manip_at(...)
    7. │   └─dplyr:::tbl_at_syms(.tbl, .vars, .include_group_vars = .include_group_vars)
    8. │     └─dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars)
    9. │       └─dplyr::tbl_vars(tbl)
   10. │         ├─dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   11. │         │ └─base::structure(...)
   12. │         └─dplyr:::tbl_vars_dispatch(x)
   13. ├─tidyr::unnest(., data)
   14. ├─dplyr::filter(., purrr::map_lgl(data, ~nrow(.) > 0))
   15. ├─dplyr::mutate(., data = purrr::map(data, f, item, feature, value))
   16. ├─dplyr:::mutate.data.frame(...)
   17. │ └─dplyr:::mutate_cols(.data, ..., caller_env = caller_env())
   18. │   ├─base::withCallingHandlers(...)
   19. │   └─mask$eval_all_mutate(quo)
   20. ├─purrr::map(data, f, item, feature, value)
   21. │ └─widyr:::.f(.x[[i]], ...)
   22. │   └─widyr:::new_f(tbl, item, feature, value, ...)
   23. ├─base::loadNamespace(x)
   24. │ ├─base::namespaceImport(...)
   25. │ └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   26. │   ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   27. │   │ └─base:::withOneRestart(expr, restarts[[1L]])
   28. │   │   └─base:::doWithOneRestart(return(expr), restart)
   29. │   └─base::stop(cond)
   30. └─(function (e) ...
  ── Error (test-widely.R:5:5): widely can widen, operate, and re-tidy ───────────
  Error: there is no package called 'stringr'
  Backtrace:
      █
   1. ├─gapminder %>% widely(cor)(year, country, lifeExp) test-widely.R:5:4
   2. ├─widely(cor)(., year, country, lifeExp)
   3. │ └─widyr:::inner_func(...)
   4. └─base::loadNamespace(x)
   5.   ├─base::namespaceImport(...)
   6.   └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   7.     └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   8.       └─base:::withOneRestart(expr, restarts[[1L]])
   9.         └─base:::doWithOneRestart(return(expr), restart)
  ── Error (test-widely.R:27:5): widely works within groups ──────────────────────
  Error: Problem with `mutate()` column `data`.
  ℹ `data = purrr::map(data, f, row, column, value)`.
  ✖ there is no package called 'stringr'
  ℹ The error occurred in group 1: continent = Africa.
  Backtrace:
       █
    1. ├─`%>%`(...) test-widely.R:27:4
    2. ├─widely(cor)(., year, country, lifeExp)
    3. │ └─widyr:::inner_func(...)
    4. │   └─`%>%`(...)
    5. ├─dplyr::group_by_at(., dplyr::group_vars(tbl))
    6. │ └─dplyr:::manip_at(...)
    7. │   └─dplyr:::tbl_at_syms(.tbl, .vars, .include_group_vars = .include_group_vars)
    8. │     └─dplyr:::tbl_at_vars(tbl, vars, .include_group_vars = .include_group_vars)
    9. │       └─dplyr::tbl_vars(tbl)
   10. │         ├─dplyr:::new_sel_vars(tbl_vars_dispatch(x), group_vars(x))
   11. │         │ └─base::structure(...)
   12. │         └─dplyr:::tbl_vars_dispatch(x)
   13. ├─tidyr::unnest(., data)
   14. ├─dplyr::mutate(., data = purrr::map(data, f, row, column, value))
   15. ├─dplyr:::mutate.data.frame(...)
   16. │ └─dplyr:::mutate_cols(.data, ..., caller_env = caller_env())
   17. │   ├─base::withCallingHandlers(...)
   18. │   └─mask$eval_all_mutate(quo)
   19. ├─purrr::map(data, f, row, column, value)
   20. │ └─widyr:::.f(.x[[i]], ...)
   21. ├─base::loadNamespace(x)
   22. │ ├─base::namespaceImport(...)
   23. │ └─base::loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
   24. │   ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   25. │   │ └─base:::withOneRestart(expr, restarts[[1L]])
   26. │   │   └─base:::doWithOneRestart(return(expr), restart)
   27. │   └─base::stop(cond)
   28. └─(function (e) ...
  
  [ FAIL 12 | WARN 0 | SKIP 0 | PASS 5 ]
  Error: Test failures
  Execution halted