Re: [Rd] Suggestion: default print method for S3 generics could offer some insights on '...' among registered methods

2025-06-10 Thread Mikael Jagan
On 2025-06-10 12:15 pm, Michael Chirico wrote: Thanks for the thoughtful reply Mikael. Any function F with '...' as a formal argument can pass '...' to another function G. Yes, that's true. The difference is that in print(F) we can _usually_ pick out at a glance how '...' is being used --

Re: [Rd] Suggestion: default print method for S3 generics could offer some insights on '...' among registered methods

2025-06-10 Thread Duncan Murdoch
On 2025-06-10 1:46 p.m., Michael Chirico wrote: When it comes to adding more info in the help pages, we'd be remiss not to point out the great engineering work the tidyverse folks have put in to this end: https://dplyr.tidyverse.org/reference/mutate.html Methods available in currently loaded p

Re: [Rd] Suggestion: default print method for S3 generics could offer some insights on '...' among registered methods

2025-06-10 Thread Michael Chirico
When it comes to adding more info in the help pages, we'd be remiss not to point out the great engineering work the tidyverse folks have put in to this end: https://dplyr.tidyverse.org/reference/mutate.html > Methods available in currently loaded packages: dbplyr (tbl_lazy), dplyr > (data.frame)

Re: [Rd] Suggestion: default print method for S3 generics could offer some insights on '...' among registered methods

2025-06-10 Thread Michael Chirico
Thanks for the thoughtful reply Mikael. > Any function F with '...' as a formal argument can pass '...' to another > function G. Yes, that's true. The difference is that in print(F) we can _usually_ pick out at a glance how '...' is being used -- we can see which 'G' is getting '...'. For S3 ge

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