Because aggregate.formula has a formula argument but the generic has an x argument neither of these work:
mtcars |> aggregate(x = mpg ~ cyl, FUN = mean) mtcars |> aggregate(formula = mpg ~ cyl, FUN = mean) This does work: mtcars |> stats:::aggregate.formula(formula = mpg ~ cyl, FUN = mean) Suggest that aggregate.formula be exported. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel