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

Refactor stat computation methods #1220

hadley opened this Issue Jul 30, 2015 · 2 comments


None yet
1 participant

hadley commented Jul 30, 2015

Many geoms need to alert the user about default choices. It would be convenient to have a standard inform_defaults method that prints once per stat (not once per group or once per facet). This would provide a consistent approach to informing the user, rather than the ~3 different approaches currently used.

hadley added a commit that referenced this issue Jul 30, 2015


This comment has been minimized.


hadley commented Jul 30, 2015

Should inform_defaults actually be updated compute_params? Would change behaviour slightly (params currently computed per panel), but would create more consistent output, and messages could be more informative.

Is it better to make compute_groups() more explicit by pulling out into own function that each stat much then call?

@hadley hadley closed this in 52a9fee Aug 4, 2015

@hadley hadley reopened this Aug 4, 2015


This comment has been minimized.


hadley commented Aug 4, 2015

  • inform_defaults() -> compute_params()
  • calculate_groups() -> compute(), calculate() -> compute_group()
  • In boxplot and smooth, replace calculate_groups() with compute_params()

@hadley hadley closed this in 33e167f Aug 5, 2015

@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.