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

Can `sort_unique()` pass along the `decreasing` argument to `sort()`? #950

Closed
DavisVaughan opened this issue Mar 15, 2019 · 3 comments

Comments

@DavisVaughan
Copy link

commented Mar 15, 2019

It looks like sort_unique() is simply unique(x).sort(), as shown here. Would it be possible to expose the decreasing argument of sort() to sort_unique()? I can call both separately to do this, but it seems useful to wrap the pattern completely.

@eddelbuettel

This comment has been minimized.

Copy link
Member

commented Mar 15, 2019

Yes, looks like an oversight we can fix.

Maybe wait a day or three before PRing as I am trying to get 1.0.1 out of the door but I am seriously short of resources for the rev.dep. So patience is a virtue.

@DavisVaughan

This comment has been minimized.

Copy link
Author

commented Mar 15, 2019

Sure, I put it on my calendar to work on a week from now. I'll be out a bit next week. Thanks

coatless added a commit to coatless/Rcpp that referenced this issue Mar 20, 2019

eddelbuettel added a commit that referenced this issue Mar 23, 2019

Added decreasing parameter to sort_unique() to address #950. (#958)
* Added decreasing parameter to sort_unique() to address #950.

* Allow the travis build to run for 20 minutes.

* Travis wait doesn't play nicely with docker without a workaround.

c.f. travis-ci/travis-ci#6934 (comment)

* Add type...

* Use `na.last = FALSE` to disable changing orders.

Note: `unique()`'s unit test use `na.last = TRUE` because sorting was done at the R level instead of the C++ level.

* Remove travis debug setup and enable only one `na.last`
@eddelbuettel

This comment has been minimized.

Copy link
Member

commented Mar 23, 2019

Closed in #958

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.