<dplyr:::mutate_error/rlang_error/error/condition>
Error in `dplyr::mutate(.data = .y, stat = as.character(glue::glue(statistic[[.data$variable[1]]], 
    .envir = cards::get_ard_statistics(.x, .column = "stat_fmt"))))`: i In argument: `stat = as.character(...)`.
Caused by error in `glue_data()`:
! is.environment(.envir) is not TRUE

test_that("tax_datatable function works fine with data_fungi dataset", {
expect_silent(taxdt <- tax_datatable(data_fungi, taxonomic_level = 1:2))
expect_no_warning(taxdt <- suppressWarnings(tax_datatable(data_fungi, modality = data_fungi@sam_data$Height)))
test_that("tax_datatable function works fine with enterotype dataset", {
expect_s3_class(tax_datatable(enterotype, modality = enterotype@sam_data$SeqTech), "datatables")
data_fungi_low_high <- subset_samples(data_fungi, Height %in% c("Low", "High"))
test_that("compare_pairs_pq function works fine with data_fungi dataset", {
expect_s3_class(compare_pairs_pq(data_fungi_low_high, bifactor = "Height", merge_sample_by = "Height"), "tbl_df")
expect_message(expect_message(compare_pairs_pq(data_fungi_low_high_withNA, bifactor = "Height", merge_sample_by = "Height")))
expect_equal(dim(compare_pairs_pq(data_fungi_low_high, bifactor = "Height", merge_sample_by = "Height")), c(1, 13))
expect_s3_class(compare_pairs_pq(data_fungi_low_high, bifactor = "Height", merge_sample_by = "Height", nb_min_seq = 2), "tbl_df")
expect_s3_class(compare_pairs_pq(data_fungi_low_high, bifactor = "Height", merge_sample_by = "Height", veg_index = "simpson"), "tbl_df")
expect_s3_class(compare_pairs_pq(data_fungi_low_high_withNA, bifactor = "Height", merge_sample_by = "Height", modality = "Time"), "tbl_df")
expect_equal(dim(compare_pairs_pq(data_fungi_low_high_withNA, bifactor = "Height", merge_sample_by = "Height", modality = "Time")), c(4, 13))
test_that("tbl_sum_samdata function works fine with data_fungi and enterotype dataset", {
expect_s3_class(tbl_sum_samdata(data_fungi, remove_col_unique_value = FALSE), "tbl_summary")
type = list(Time ~ "continuous2", Height ~ "categorical"),
statistic = list(Time ~ c("{median} ({p25}, {p75})", "{min}, {max}"))