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

Need to implement slice_head(), slice_tail() - Done with slice_min(), slice_max(), and slice_sample() #4

Closed
PursuitOfDataScience opened this issue May 2, 2023 · 8 comments
Assignees

Comments

@PursuitOfDataScience
Copy link

Hi,

As an experienced tidyverse user/developer who is learning Julia, I am just impressed by the Tidier package. Transferring my R knowledge to Julia is almost effortless, thanks to Tidier!

There are two very useful functions from dplyr: slice_min() and slice_max(). I think they should be included in Tidier. This link leads to the R documentation.

Thanks!

@kdpsingh
Copy link
Member

kdpsingh commented May 2, 2023

We can totally implement this by wrapping @filter() -- this is better then @arrange() followed by @slice() because both slice_min() and slice_max() need to return multiple values when there are ties.

@zhezhaozz
Copy link
Contributor

Will work on this

@kdpsingh kdpsingh transferred this issue from TidierOrg/Tidier.jl Jul 29, 2023
@kdpsingh
Copy link
Member

Per https://x.com/alextantos1/status/1692440814448759208?s=46&t=PEX2NKcgCDoTOe3kHQFmDA, we should also add @slice_sample()

@kdpsingh kdpsingh changed the title implementing slice_min() and slice_max() implementing slice_min(), slice_max(), and slice_sample() Aug 18, 2023
@kdpsingh
Copy link
Member

kdpsingh commented Aug 22, 2023

@slice_sample() is now implemented. Still need to implement the other @slice_* variants.

@drizk1
Copy link
Member

drizk1 commented Nov 13, 2023

Finally figured out '@slice_min' and '@slice_max' and PRed them

@kdpsingh
Copy link
Member

Merged! Thank you so much @drizk1.

We’re only missing @slice_head() and @slice_tail() so will leave this issue open but will rename it.

@kdpsingh kdpsingh changed the title implementing slice_min(), slice_max(), and slice_sample() Need to implement slice_head(), slice_tail() - Done with slice_min(), slice_max(), and slice_sample() Nov 18, 2023
@drizk1
Copy link
Member

drizk1 commented Nov 18, 2023

Awesome. I'll take a look at those.

Edit: I now have these both drafted to support n and prop. I'll throw in a PR a little later.

@kdpsingh
Copy link
Member

Thanks to @drizk1, @slice_head() and @slice_tail() are now implemented in v0.13.1. Will be pushed to registry shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants