Re: [Rd] Suggestion: Modify common hypothesis tests and models to work better with pipes

2025-06-10 Thread Gabor Grothendieck
I am not saying this is wonderful but this does work: penguins |> subset(species != "Gentoo") |> stats:::t.test.formula(formula = bill_len ~ species) Also there is a problem with t.test in that methods are not supposed to have conflicting signatures but > args(t.test) function

[Rd] Suggestion: Modify common hypothesis tests and models to work better with pipes

2025-06-10 Thread Måns Thulin
To use functions for common statistical tests/models, like t.test, wilcox.test, lm, glm, and aov, we must currently use the pipe placeholder _ when using pipes: penguins |> subset(species != "Gentoo") |> t.test(bill_len ~ species, data = _) The syntax would be cleaner and perhaps more int