infer & arbitrary test statistic

I'm using infer 1.1.0 and it won't allow me to use an arbitrary test statistic, which is supposed to be a new feature.

trimmed_mean_10 <- function(x, order, ...) {mean(x$Delay, trim=0.10)}

obs_trimmed_mean <- FlightDelays |>
specify(Delay ~ Carrier) |>
calculate(stat=trimmed_mean_10)

gives me

Error in calculate():
! stat must be 'string', not 'closure'.

Am I doing something wrong?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.