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

[Request] Filter by group criteria #1456

Closed
red-swan opened this issue Dec 1, 2015 · 3 comments
Closed

[Request] Filter by group criteria #1456

red-swan opened this issue Dec 1, 2015 · 3 comments

Comments

@red-swan
Copy link

red-swan commented Dec 1, 2015

DT[ .N > 60, by = groupingID]
to quickly filter out any groups where you don't have 60 observations or
DT[ min(Date) > "1989-11-09" , by = groupingID]
to filter out a group that started before the Berlin Wall fell

I'm new to github and don't know how this all works. Forgive me if this is not proper protocol. Thank you.

@red-swan red-swan changed the title [Request] Filter by group function [Request] Filter by group criteria Dec 1, 2015
@franknarf1
Copy link
Contributor

I think this is roughly the same as #788

@red-swan
Copy link
Author

red-swan commented Dec 1, 2015

If this is something that you've decided you'd like to implement, I'd love to help. I'm new to collaborating, though, so I would need help to be helpful.

@arunsrinivasan
Copy link
Member

Yes, it's a dup. There's already a way to do it.. DT[, .SD[.N > 60], by=ID]. It just needs to be optimised better.. which I'll work on later for this release.

PS: of course we'd be happy to receive PRs. There are quite a few issues for you to choose from :-).

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

No branches or pull requests

3 participants