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

consider making geom_smooth() formula = "auto" the default #3205

Closed
behrman opened this issue Mar 25, 2019 · 2 comments · Fixed by #3307
Closed

consider making geom_smooth() formula = "auto" the default #3205

behrman opened this issue Mar 25, 2019 · 2 comments · Fixed by #3307
Labels
feature a feature request or enhancement good first issue ❤️ good issue for first-time contributors layers 📈 wip work in progress

Comments

@behrman
Copy link

behrman commented Mar 25, 2019

In observing the code of my students, I can see that many have mental models of geom_smooth() that lead them to use it incorrectly. Their mental model is to use the method argument to specify the type of smoothing, and this is reasonable. It works fine for method = "lm" and method = "loess" but not method = "gam", since the default formula works well with "lm" and "loess" but not "gam". Why not have the default formula be "auto", which would look at the specified method and use y ~ x for "lm" and "loess" and y ~ s(x, bs = "cs") for "gam".

I realize that the formula used by method = "auto" for "gam" is explained in the third paragraph of the help entry for the method argument, but in practice this is not connecting with a large proportion of the users I'm seeing.

@skaltman

@hadley
Copy link
Member

hadley commented Apr 17, 2019

I think it would make sense to default formula to NULL, and then fill later on where the method = "auto" work is done. This would be a great contribution for someone who wanted to contribute to ggplot2 for the first time 😄

@hadley hadley added feature a feature request or enhancement good first issue ❤️ good issue for first-time contributors help wanted ❤️ we'd love your help! layers 📈 labels Apr 17, 2019
@hadley hadley added wip work in progress and removed help wanted ❤️ we'd love your help! labels Jun 18, 2019
@lock
Copy link

lock bot commented Apr 2, 2020

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement good first issue ❤️ good issue for first-time contributors layers 📈 wip work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants