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

extended_breaks should expose the "only.loose" argument of extended #99

Closed
billdenney opened this issue Sep 15, 2017 · 0 comments · Fixed by #152
Closed

extended_breaks should expose the "only.loose" argument of extended #99

billdenney opened this issue Sep 15, 2017 · 0 comments · Fixed by #152
Labels
feature a feature request or enhancement wip work in progress

Comments

@billdenney
Copy link
Contributor

I want to access the only.loose argument to labeling::extended when calling extended_breaks, but the function forces it to FALSE. It would make alterations to the handling of breaks more flexible if the function were updated to something like the following (adding one default function argument and updating the call to labeling::extended):

extended_breaks <- function(n = 5, ..., only.loose=FALSE) {
  function(x) {
    x <- x[is.finite(x)]
    if (length(x) == 0) {
      return(numeric())
    }

    rng <- range(x)
    labeling::extended(rng[1], rng[2], n, only.loose = only.loose, ...)
  }
}
@dpseidel dpseidel added the feature a feature request or enhancement label Jun 4, 2018
dpseidel added a commit to dpseidel/scales that referenced this issue Jul 17, 2018
@dpseidel dpseidel added the wip work in progress label Jul 17, 2018
hadley pushed a commit that referenced this issue Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement wip work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants