Basic functionality: returns a data.table with expected columns

Threshold handling: adjusts output based on the threshold

Variable selection: only processes specified variables

Grouping functionality: correctly groups the results

Return type handling: handles different return types correctly

Error in `dt.calculate(dt.name = dt.name, the.variables = the.variables, 
    the.functions = "max.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 maximum values correctly for each group", {
expect_true(is.data.table(max_values), info = "Should return a data.table")
it("handles non-numeric columns according to non.numeric.value parameter", {
# Assuming iris dataset has a non-numeric column for testing
# Non-numeric columns should be missing or the first entry based on non.numeric.value
expect_true(all(is.na(max_values$NonNumeric) | max_values$NonNumeric == "a"), info = "Non-numeric values should be NA or the first entry")

"computes maximum values correctly for each group"
"handles non-numeric columns according to non.numeric.value parameter"
"Non-numeric values should be NA or the first entry"

dt.max.numerics functionality: computes maximum values correctly for each group

dt.max.numerics functionality: handles non-numeric columns according to non.numeric.value parameter

Error in `dt.calculate(dt.name = dt.name, the.variables = the.variables, 
    the.functions = "mean.measured", the.filter = the.filter, 
    grouping.variables = grouping.variables, sortby.group = sortby.group, 
    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.