Running 'testthat.R' [3s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # Work-around for bug (https://github.com/hadley/testthat/issues/144)
  > Sys.setenv("R_TESTS" = "")
  > 
  > # library 
  > library(testthat)
  > library(HTSSIP)
  > 
  > # test check
  > test_check('HTSSIP')
  -- 1. Error: Beta diversity from a list of phyloseq objects (@test-BD_ordination
  there is no package called 'S4Vectors'
  1: physeq_list_betaDiv(physeq_S2D2_l) at testthat/test-BD_ordinations.R:2
  2: plyr::llply(physeq_l, phyloseq::distance, method = method, weighted = weighted, fast = fast, 
         normalized = normalized, parallel = parallel)
  3: phyloseq::distance
  4: getExportedValue(pkg, name)
  5: asNamespace(ns)
  6: getNamespace(ns)
  7: tryCatch(loadNamespace(name), error = function(e) stop(e))
  8: tryCatchList(expr, classes, parentenv, handlers)
  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: value[[3L]](cond)
  
  -- 2. Error: DESeq2_l2fc runs with default params (@test-DESeq2_l2fc.R#2)  -----
  there is no package called 'S4Vectors'
  1: DESeq2_l2fc(physeq_S2D2_l[[1]], sparsity_threshold = 0.25, density_min = 1.71, density_max = 1.75, 
         design = ~Substrate) at testthat/test-DESeq2_l2fc.R:2
  2: phyloseq::sample_data
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 3. Error: DESeq2_l2fc runs with sparsity_apply=heavy (@test-DESeq2_l2fc.R#15)
  there is no package called 'S4Vectors'
  1: DESeq2_l2fc(physeq_S2D2_l[[1]], sparsity_threshold = 0.25, density_min = 1.71, density_max = 1.75, 
         design = ~Substrate, sparsity_apply = "heavy") at testthat/test-DESeq2_l2fc.R:15
  2: phyloseq::sample_data
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 6. Error: (unknown) (@test-HRSIP.R#1)  --------------------------------------
  unable to find required package 'phyloseq'
  1: test_that("HRSIP runs with default", {
         df_l2fc = HRSIP(physeq_S2D2_l[[1]], sparsity_threshold = c(0, 0.15, 0.3), design = ~Substrate)
         expect_is(df_l2fc, "data.frame")
         expect_gt(nrow(df_l2fc), 0)
         df_l2fc_s = df_l2fc %>% dplyr::group_by(sparsity_threshold, density_min, density_max) %>% 
             dplyr::summarize(n = n())
         expect_gt(nrow(df_l2fc_s), 1)
     }) at testthat/test-HRSIP.R:1
  2: test_code(desc, code, env = parent.frame())
  3: 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) {
     })
  4: tryCatchList(expr, classes, parentenv, handlers)
  5: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), names[nh], 
         parentenv, handlers[[nh]])
  6: doTryCatch(return(expr), name, parentenv, handler)
  7: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  10: register_expectation(e)
  ...
  20: paste0(cli::rule(header, col = testthat_style("error")), "\n", format(x))
  21: format(x)
  22: format.expectation_error(x)
  23: paste(c(x$message, create_traceback(x$call)), collapse = "\n")
  24: create_traceback(x$call)
  25: lapply(callstack, deparse, width.cutoff = cli::console_width())
  26: FUN(X[[i]], ...)
  27: (function (Class, where = topenv(parent.frame()), package = packageSlot(Class), inherits = TRUE) 
     {
         if (inherits) {
             value <- .getClassesFromCache(Class)
             if (is.list(value)) 
                 value <- .resolveClassList(value, where, package)
         }
         else value <- NULL
         if (is.null(value)) {
             cname <- classMetaName(if (length(Class) > 1L) 
                 Class[[1L]]
             else Class)
             if (is.character(where)) {
                 package <- where
             }
             if (isTRUE(nzchar(package))) {
                 package <- .requirePackage(package)
             }
             if (is.environment(package)) {
                 value <- get0(cname, package, inherits = inherits)
             }
             if (is.null(value)) 
                 value <- get0(cname, where, inherits = inherits)
         }
         value
     })(structure("phyloseq", package = "phyloseq"))
  28: .requirePackage(package)
  29: stop(gettextf("unable to find required package %s", sQuote(package)), domain = NA)
  
  -- 7. Error: phyloseq sim (@test-HTSSIP_sim.R#57)  -----------------------------
  there is no package called 'S4Vectors'
  1: HTSSIP_sim(L$locs, L$params) at testthat/test-HTSSIP_sim.R:57
  2: phyloseq::phyloseq
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 8. Error: phyloseq sim w/ metadata (@test-HTSSIP_sim.R#73)  -----------------
  there is no package called 'S4Vectors'
  1: HTSSIP_sim(L$locs, L$params, meta = meta) at testthat/test-HTSSIP_sim.R:73
  2: phyloseq::phyloseq
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 9. Error: phyloseq sample_data can be converted to dataframe (@test-Util.R#9)
  there is no package called 'S4Vectors'
  1: phyloseq2df(physeq_S2D2, phyloseq::sample_data) at testthat/test-Util.R:9
  2: phyloseq::sample_data
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 10. Error: phyloseq tax_table can be converted to dataframe (@test-Util.R#17)
  there is no package called 'S4Vectors'
  1: phyloseq2df(physeq_S2D2, phyloseq::tax_table) at testthat/test-Util.R:17
  2: phyloseq::tax_table
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 11. Error: phyloseq otu_table can be converted to dataframe (@test-Util.R#24)
  there is no package called 'S4Vectors'
  1: phyloseq2df(physeq_S2D2, phyloseq::otu_table) at testthat/test-Util.R:24
  2: phyloseq::otu_table
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 12. Error: phyloseq_re sample_data can be converted to dataframe (@test-Util.
  there is no package called 'S4Vectors'
  1: phyloseq2df(physeq_rep3, phyloseq::sample_data) at testthat/test-Util.R:34
  2: phyloseq::sample_data
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 13. Error: phyloseq otu_table can be converted to dataframe (@test-Util.R#47)
  there is no package called 'S4Vectors'
  1: phyloseq2df(physeq_rep3, phyloseq::otu_table) at testthat/test-Util.R:47
  2: phyloseq::otu_table
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 14. Error: physeq_format runs (@test-chk.R#3)  ------------------------------
  there is no package called 'S4Vectors'
  1: physeq_format(physeq_S2D2) at testthat/test-chk.R:3
  2: phyloseq::sample_data
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 15. Error: delta BD on rep3 dataset (@test-delta_BD.R#29)  ------------------
  there is no package called 'S4Vectors'
  1: delta_BD(physeq_rep3, control_expr = "Treatment==\"12C-Con\"") at testthat/test-delta_BD.R:29
  2: qSIP_atom_excess_format(physeq, control_expr, treatment_rep = NULL)
  3: phyloseq2table(physeq, include_sample_data = TRUE, sample_col_keep = cols, control_expr = control_expr)
  4: phyloseq::otu_table
  5: getExportedValue(pkg, name)
  6: asNamespace(ns)
  7: getNamespace(ns)
  8: tryCatch(loadNamespace(name), error = function(e) stop(e))
  9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: value[[3L]](cond)
  
  -- 16. Error: heavy-SIP runs on replicated dataset with default settings (@test-
  there is no package called 'S4Vectors'
  1: heavy_SIP(physeq_rep3, ex = "Treatment=='12C-Con'") at testthat/test-heavy_SIP.R:7
  2: phyloseq::filter_taxa
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 17. Error: heavy-SIP runs on non-rep dataset with default settings (@test-hea
  there is no package called 'S4Vectors'
  1: heavy_SIP(physeq_S2D2_l[[1]], ex = "Substrate=='12C-Con'") at testthat/test-heavy_SIP.R:31
  2: phyloseq::filter_taxa
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 18. Error: heavy-SIP runs on replicated dataset with t-test (@test-heavy_SIP.
  there is no package called 'S4Vectors'
  1: heavy_SIP(physeq_rep3, ex = "Treatment=='12C-Con'", comparison = "H-v-L", hypo_test = "t-test") at testthat/test-heavy_SIP.R:56
  2: phyloseq::filter_taxa
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 19. Error: heavy-SIP runs on replicated dataset with wilcox (@test-heavy_SIP.
  there is no package called 'S4Vectors'
  1: heavy_SIP(physeq_rep3, ex = "Treatment=='12C-Con'", comparison = "H-v-L", hypo_test = "wilcox") at testthat/test-heavy_SIP.R:80
  2: phyloseq::filter_taxa
  3: getExportedValue(pkg, name)
  4: asNamespace(ns)
  5: getNamespace(ns)
  6: tryCatch(loadNamespace(name), error = function(e) stop(e))
  7: tryCatchList(expr, classes, parentenv, handlers)
  8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  9: value[[3L]](cond)
  
  -- 20. Error: Getting params for subsetting (@test-phyloseq_subset.R#3)  -------
  there is no package called 'S4Vectors'
  1: get_treatment_params(physeq_S2D2, X) at testthat/test-phyloseq_subset.R:3
  2: phyloseq2df(physeq, phyloseq::sample_data)
  3: phyloseq::sample_data
  4: getExportedValue(pkg, name)
  5: asNamespace(ns)
  6: getNamespace(ns)
  7: tryCatch(loadNamespace(name), error = function(e) stop(e))
  8: tryCatchList(expr, classes, parentenv, handlers)
  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: value[[3L]](cond)
  
  -- 21. Error: Subsetting phyloseq object (@test-phyloseq_subset.R#43)  ---------
  there is no package called 'S4Vectors'
  1: get_treatment_params(physeq_S2D2, c("Substrate", "Day")) at testthat/test-phyloseq_subset.R:43
  2: phyloseq2df(physeq, phyloseq::sample_data)
  3: phyloseq::sample_data
  4: getExportedValue(pkg, name)
  5: asNamespace(ns)
  6: getNamespace(ns)
  7: tryCatch(loadNamespace(name), error = function(e) stop(e))
  8: tryCatchList(expr, classes, parentenv, handlers)
  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: value[[3L]](cond)
  
  -- 22. Error: Subsetting phyloseq object (@test-phyloseq_subset.R#60)  ---------
  there is no package called 'S4Vectors'
  1: get_treatment_params(physeq_rep3, c("Treatment", "Replicate")) at testthat/test-phyloseq_subset.R:60
  2: phyloseq2df(physeq, phyloseq::sample_data)
  3: phyloseq::sample_data
  4: getExportedValue(pkg, name)
  5: asNamespace(ns)
  6: getNamespace(ns)
  7: tryCatch(loadNamespace(name), error = function(e) stop(e))
  8: tryCatchList(expr, classes, parentenv, handlers)
  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: value[[3L]](cond)
  
  -- 23. Error: Naming phyloseq object (@test-phyloseq_subset.R#77)  -------------
  there is no package called 'S4Vectors'
  1: get_treatment_params(physeq_S2D2, c("Substrate", "Day")) at testthat/test-phyloseq_subset.R:77
  2: phyloseq2df(physeq, phyloseq::sample_data)
  3: phyloseq::sample_data
  4: getExportedValue(pkg, name)
  5: asNamespace(ns)
  6: getNamespace(ns)
  7: tryCatch(loadNamespace(name), error = function(e) stop(e))
  8: tryCatchList(expr, classes, parentenv, handlers)
  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  10: value[[3L]](cond)
  
  -- 24. Error: qPCR simulation warnings (@test-qPCR.R#101)  ---------------------
  there is no package called 'S4Vectors'
  1: expect_warning(qPCR_sim(physeq_S2D2, control_expr = "Substrate==\"XXX\"", control_mean_fun = L$control_mean_fun, 
         control_sd_fun = L$control_sd_fun, treat_mean_fun = L$treat_mean_fun, treat_sd_fun = L$treat_sd_fun)) at testthat/test-qPCR.R:101
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: qPCR_sim(physeq_S2D2, control_expr = "Substrate==\"XXX\"", control_mean_fun = L$control_mean_fun, 
         control_sd_fun = L$control_sd_fun, treat_mean_fun = L$treat_mean_fun, treat_sd_fun = L$treat_sd_fun)
  7: phyloseq2df(physeq, phyloseq::sample_data)
  8: phyloseq::sample_data
  9: getExportedValue(pkg, name)
  10: asNamespace(ns)
  11: getNamespace(ns)
  12: tryCatch(loadNamespace(name), error = function(e) stop(e))
  13: tryCatchList(expr, classes, parentenv, handlers)
  14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  15: value[[3L]](cond)
  
  -- 25. Error: bootstrap iteration is working (@test-qSIP_atom_excess.R#33)  ----
  there is no package called 'S4Vectors'
  1: OTU_qPCR_trans(physeq_rep3, physeq_rep3_qPCR) at testthat/test-qSIP_atom_excess.R:33
  2: colnames(phyloseq::otu_table(physeq))
  3: is.data.frame(x)
  4: phyloseq::otu_table
  5: getExportedValue(pkg, name)
  6: asNamespace(ns)
  7: getNamespace(ns)
  8: tryCatch(loadNamespace(name), error = function(e) stop(e))
  9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: value[[3L]](cond)
  
  -- 26. Error: qPCR OTU table transformation (@test-qSIP_trans.R#38)  -----------
  there is no package called 'S4Vectors'
  1: OTU_qPCR_trans(physeq_rep3, physeq_rep3_qPCR) at testthat/test-qSIP_trans.R:38
  2: colnames(phyloseq::otu_table(physeq))
  3: is.data.frame(x)
  4: phyloseq::otu_table
  5: getExportedValue(pkg, name)
  6: asNamespace(ns)
  7: getNamespace(ns)
  8: tryCatch(loadNamespace(name), error = function(e) stop(e))
  9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: value[[3L]](cond)
  
  == testthat results  ===========================================================
  OK: 28 SKIPPED: 14 FAILED: 26
  1. Error: Beta diversity from a list of phyloseq objects (@test-BD_ordinations.R#2) 
  2. Error: DESeq2_l2fc runs with default params (@test-DESeq2_l2fc.R#2) 
  3. Error: DESeq2_l2fc runs with sparsity_apply=heavy (@test-DESeq2_l2fc.R#15) 
  4. Error: HRSIP runs with default (@test-HRSIP.R#3) 
  5. Error: HRSIP runs with default (@test-HRSIP.R#3) 
  6. Error: (unknown) (@test-HRSIP.R#1) 
  7. Error: phyloseq sim (@test-HTSSIP_sim.R#57) 
  8. Error: phyloseq sim w/ metadata (@test-HTSSIP_sim.R#73) 
  9. Error: phyloseq sample_data can be converted to dataframe (@test-Util.R#9) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted