Running ‘testthat.R’ [17s/23s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(nbTransmission)
  > 
  > test_check("nbTransmission")
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |===================================                                   |  50%
    |                                                                            
    |======================================================================| 100%── ERROR (test_calcSI.R:34:1): (code run outside of `test_that()`) ─────────────
  Error: cannot xtfrm 'x'
  Backtrace:
       █
    1. └─nbTransmission:::estimateSIWrapper(...) test_calcSI.R:34:0
    2.   └─nbTransmission::estimateSI(...) test_calcSI.R:18:2
    3.     └─nbTransmission::clusterInfectors(...)
    4.       ├─dplyr::group_modify(...)
    5.       └─dplyr:::group_modify.grouped_df(...)
    6.         ├─dplyr::group_map(.data, fun, .keep = .keep)
    7.         └─dplyr:::group_map.data.frame(.data, fun, .keep = .keep)
    8.           └─dplyr:::map2(chunks, group_keys, .f, ...)
    9.             └─base::mapply(.f, .x, .y, MoreArgs = list(...), SIMPLIFY = FALSE)
   10.               └─(function (.x, .y) ...
   11.                 └─nbTransmission:::.f(.x, .y, ...)
   12.                   └─nbTransmission:::findClustersHC(.x, pVar, cutoff = cutoff, clustMethod = clustMethod)
   13.                     ├─base::as.data.frame(df[order(-df[, pVar]), ])
   14.                     ├─df[order(-df[, pVar]), ]
   15.                     ├─tibble:::`[.tbl_df`(df, order(-df[, pVar]), )
   16.                     └─base::order(-df[, pVar])
   17.                       └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   18.                         └─base:::FUN(X[[i]], ...)
   19.                           ├─base::as.vector(xtfrm(x))
   20.                           ├─base::xtfrm(x)
   21.                           └─base::xtfrm.default(x)
  
  ── ERROR (test_clusterInfectors.R:22:1): (code run outside of `test_that()`) ───
  Error: cannot xtfrm 'x'
  Backtrace:
       █
    1. └─nbTransmission:::clusterInfWrapper(...) test_clusterInfectors.R:22:0
    2.   └─nbTransmission::clusterInfectors(...) test_clusterInfectors.R:13:2
    3.     ├─dplyr::group_modify(...)
    4.     └─dplyr:::group_modify.grouped_df(...)
    5.       ├─dplyr::group_map(.data, fun, .keep = .keep)
    6.       └─dplyr:::group_map.data.frame(.data, fun, .keep = .keep)
    7.         └─dplyr:::map2(chunks, group_keys, .f, ...)
    8.           └─base::mapply(.f, .x, .y, MoreArgs = list(...), SIMPLIFY = FALSE)
    9.             └─(function (.x, .y) ...
   10.               └─nbTransmission:::.f(.x, .y, ...)
   11.                 └─nbTransmission:::findClustersHC(.x, pVar, cutoff = cutoff, clustMethod = clustMethod)
   12.                   ├─base::as.data.frame(df[order(-df[, pVar]), ])
   13.                   ├─df[order(-df[, pVar]), ]
   14.                   ├─tibble:::`[.tbl_df`(df, order(-df[, pVar]), )
   15.                   └─base::order(-df[, pVar])
   16.                     └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   17.                       └─base:::FUN(X[[i]], ...)
   18.                         ├─base::as.vector(xtfrm(x))
   19.                         ├─base::xtfrm(x)
   20.                         └─base::xtfrm.default(x)
  
  ── ERROR (test_visualizeResults.R:60:3): Plot functions return null objects with
  Error: cannot xtfrm 'x'
  Backtrace:
       █
    1. └─nbTransmission:::nbNetworkWrapper(...) test_visualizeResults.R:60:2
    2.   └─nbTransmission::nbNetwork(...) test_visualizeResults.R:18:2
    3.     └─nbTransmission:::createNetwork(...)
    4.       └─nbTransmission::clusterInfectors(...)
    5.         ├─dplyr::group_modify(...)
    6.         └─dplyr:::group_modify.grouped_df(...)
    7.           ├─dplyr::group_map(.data, fun, .keep = .keep)
    8.           └─dplyr:::group_map.data.frame(.data, fun, .keep = .keep)
    9.             └─dplyr:::map2(chunks, group_keys, .f, ...)
   10.               └─base::mapply(.f, .x, .y, MoreArgs = list(...), SIMPLIFY = FALSE)
   11.                 └─(function (.x, .y) ...
   12.                   └─nbTransmission:::.f(.x, .y, ...)
   13.                     └─nbTransmission:::findClustersHC(.x, pVar, cutoff = cutoff, clustMethod = clustMethod)
   14.                       ├─base::as.data.frame(df[order(-df[, pVar]), ])
   15.                       ├─df[order(-df[, pVar]), ]
   16.                       ├─tibble:::`[.tbl_df`(df, order(-df[, pVar]), )
   17.                       └─base::order(-df[, pVar])
   18.                         └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   19.                           └─base:::FUN(X[[i]], ...)
   20.                             ├─base::as.vector(xtfrm(x))
   21.                             ├─base::xtfrm(x)
   22.                             └─base::xtfrm.default(x)
  
  ── ERROR (test_visualizeResults.R:83:3): Internal createNetwork function returns
  Error: cannot xtfrm 'x'
  Backtrace:
       █
    1. └─nbTransmission:::createNetworkWrapper(...) test_visualizeResults.R:83:2
    2.   └─nbTransmission:::createNetwork(...) test_visualizeResults.R:48:2
    3.     └─nbTransmission::clusterInfectors(...)
    4.       ├─dplyr::group_modify(...)
    5.       └─dplyr:::group_modify.grouped_df(...)
    6.         ├─dplyr::group_map(.data, fun, .keep = .keep)
    7.         └─dplyr:::group_map.data.frame(.data, fun, .keep = .keep)
    8.           └─dplyr:::map2(chunks, group_keys, .f, ...)
    9.             └─base::mapply(.f, .x, .y, MoreArgs = list(...), SIMPLIFY = FALSE)
   10.               └─(function (.x, .y) ...
   11.                 └─nbTransmission:::.f(.x, .y, ...)
   12.                   └─nbTransmission:::findClustersHC(.x, pVar, cutoff = cutoff, clustMethod = clustMethod)
   13.                     ├─base::as.data.frame(df[order(-df[, pVar]), ])
   14.                     ├─df[order(-df[, pVar]), ]
   15.                     ├─tibble:::`[.tbl_df`(df, order(-df[, pVar]), )
   16.                     └─base::order(-df[, pVar])
   17.                       └─base::lapply(z, function(x) if (is.object(x)) as.vector(xtfrm(x)) else x)
   18.                         └─base:::FUN(X[[i]], ...)
   19.                           ├─base::as.vector(xtfrm(x))
   20.                           ├─base::xtfrm(x)
   21.                           └─base::xtfrm.default(x)
  
  
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |===================================                                   |  50%
    |                                                                            
    |======================================================================| 100%══ testthat results  ═══════════════════════════════════════════════════════════
  ERROR (test_calcSI.R:34:1): (code run outside of `test_that()`)
  ERROR (test_clusterInfectors.R:22:1): (code run outside of `test_that()`)
  ERROR (test_visualizeResults.R:60:3): Plot functions return null objects with no errors
  ERROR (test_visualizeResults.R:83:3): Internal createNetwork function returns igraph object
  
  [ FAIL 4 | WARN 0 | SKIP 0 | PASS 84 ]
  Error: Test failures
  Execution halted