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

cut_width should be able to take ... for cut.default #3055

Closed
cderv opened this issue Jan 3, 2019 · 6 comments
Closed

cut_width should be able to take ... for cut.default #3055

cderv opened this issue Jan 3, 2019 · 6 comments

Comments

@cderv
Copy link
Contributor

@cderv cderv commented Jan 3, 2019

From a question in community.rstudio.com it seems like cut_width is the only one of the three functions to not take ... to pass it to cut.default

In particular, labels argument can not be used with cut_width. Just adding ... would allow this

> cut_width(runif(1000), 0.1, center = 0, labels= FALSE)
  [1]  2  6  9 10  8  7 11  6  6  3 11 11  5  6 10  3  4  8  8 11  2  3  5  2  3  6  8  7  4  6  7 11 10  4 10 11
 [37]  6  5  6  1  3  6  7  1  9  9  3  2  9 11  8  3  8  6 11 10  6  9  4  3  1  8  6  6  5 10  6  9  9  9  8  4
 [73] 11  2  2 10  4  8  9  3  3  3 11 11  4  2  8 11  8 10  5  7 10  2  1  2  6  3  2  2
 [ reached getOption("max.print") -- omitted 900 entries ]

or to change labels if the call (could always be done afterward using forcats)

I open the issue to reference the question and see if it worth doing. Seems quite easy to be consistent between those three cut_* helper in lubridate.

If you're interested I'll do a PR.

@yutannihilation
Copy link
Member

@yutannihilation yutannihilation commented Jan 5, 2019

Thanks, sounds good to me.

cut_width() is the last one of the three cut_*() functions, implemented by this commit: de18a6b. From the commit and the current source code, I see no reason that cut_width() cannot take .... A PR would be very welcome!

@cderv
Copy link
Contributor Author

@cderv cderv commented Jan 5, 2019

Do you want it now or maybe a good fit for ? 😉

@yutannihilation
Copy link
Member

@yutannihilation yutannihilation commented Jan 5, 2019

Ah, I'm not the one to label "tidy-dev-day 🤓," but I agree it's a good fit. Let's wait for the review...

tidyverse/tidy-dev-day#12

@thomasp85
Copy link
Member

@thomasp85 thomasp85 commented Apr 11, 2019

tidy verse dev day has come and gone so this is up for grabs... @cderv do you want in?

@cderv
Copy link
Contributor Author

@cderv cderv commented Apr 11, 2019

Yep I can jump in on this. Count me in !

@lock
Copy link

@lock lock bot commented Oct 9, 2019

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 Oct 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants