Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmonize position of by argument #373

Closed
Tracked by #369
strengejacke opened this issue Jan 31, 2025 · 2 comments
Closed
Tracked by #369

Harmonize position of by argument #373

strengejacke opened this issue Jan 31, 2025 · 2 comments
Labels
Consistency 🍏 🍎 Expected output across functions or API design could be more similar

Comments

@strengejacke
Copy link
Member

strengejacke commented Jan 31, 2025

@DominiqueMakowski

One thing I always forget is that estimate_relation() and alike have by not at 2nd, but 3rd position. The second argument is data. For estimate_means() and alike, by is the second argument. I often use estimate_relation(model, "variable"), and forget to add by = , which returns an error.

Should we harmonize this? Will be a breaking change, but if we decide to do so, now would be a good opportunity, I guess. I would prefer the order model, by and then data. WDYT?

Originally posted by @strengejacke in #369 (comment)

@strengejacke strengejacke added the Consistency 🍏 🍎 Expected output across functions or API design could be more similar label Jan 31, 2025
@DominiqueMakowski
Copy link
Member

DominiqueMakowski commented Feb 4, 2025

Thanks for reminder!

I'm not a 100% convinced, but this is probably because of my habits (I typically do like:

model |>
  estimate_relation(newdata)

So I would actually keep it as is...
+ one could also argue that it's much clearer if by= is written explicitly (and it's a nice and short argument) :)

So basically it boils down to whether we want to cater to Daniel's inflexible habits ^^

@strengejacke
Copy link
Member Author

Ok, let's close this. Not that crucial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Consistency 🍏 🍎 Expected output across functions or API design could be more similar
Projects
None yet
Development

No branches or pull requests

2 participants