# Convert iris to a data.table once before the tests begin
it("computes mean values correctly with filter and grouping", {
# Convert the expected Species column to a factor to match the actual results
Species = factor(c("setosa", "versicolor", "virginica")),
# Set the sorted attribute for the expected_means to match mean_values
# Check if the computed mean values match the expected values
expect_equal(mean_values, expected_means, info = "Computed means should match expected means")

"computes mean values correctly with filter and grouping"
"Computed means should match expected means"

dt.mean.numerics functionality: computes mean values correctly with filter and grouping

Error in `dt.calculate(dt.name = dt.name, the.variables = the.variables, 
    the.functions = "median.numerics", the.filter = the.filter, 
    grouping.variables = grouping.variables, sortby.group = sortby.group, 
    other.params = other.params, table.format = table.format, 
    add.function.name = add.function.name, return.as = return.as, 
    envir = envir, ...)`: Error:  the.functions must be specified with functions that are loaded.  Make sure to call library() for the required packages.

it("computes median values correctly with filter and grouping", {
# Set the sorted attribute for the expected_medians to match median_values
# Check if the computed median values match the expected values
expect_equal(median_values, expected_medians, info = "Computed medians should match expected medians")

"computes median values correctly with filter and grouping"
"Computed medians should match expected medians"

dt.median.numerics functionality: computes median values correctly with filter and grouping

Error in `dt.calculate(dt.name = dt.name, the.variables = the.variables, 
    the.functions = "min.numerics", the.filter = the.filter, 
    grouping.variables = grouping.variables, sortby.group = sortby.group, 
    other.params = other.params, table.format = table.format, 
    add.function.name = add.function.name, return.as = return.as, 
    envir = envir, ...)`: Error:  the.functions must be specified with functions that are loaded.  Make sure to call library() for the required packages.