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

Distinct .keep_all parameter #2107

Closed
rrremedio opened this issue Sep 2, 2016 · 3 comments
Closed

Distinct .keep_all parameter #2107

rrremedio opened this issue Sep 2, 2016 · 3 comments

Comments

@rrremedio
Copy link

Would not it be more natural to the parameter ".keep_all" in distinct function to be value as TRUE? I mean, as the 'd' of dplyr denotes, i'd like to subset the data.frame (here comes the 'd') based on a set of unique values of certain variables or in all of them and keep all columns, that is, keep the data.frame.

@const-ae
Copy link

Actually as far as I understand it was the default for distinct to keep all variables until dplyr version 0.5 (release notes). This issue contains more information why they changed the behavior.

@krlmlr
Copy link
Member

krlmlr commented Nov 7, 2016

It's probably not worth the effort to change that, as it's easy to change the behavior or write your own wrapper. @hadley: Please comment.

@hadley
Copy link
Member

hadley commented Nov 7, 2016

I don't think it is more natural because the values of the other columns are essentially arbitrary (because row order generally shouldn't be considered meaningful)

@hadley hadley closed this as completed Nov 7, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants