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

duplicate warning in 1.9.7 - how to switch this off #1841

Closed
ghost opened this issue Sep 6, 2016 · 3 comments
Closed

duplicate warning in 1.9.7 - how to switch this off #1841

ghost opened this issue Sep 6, 2016 · 3 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Sep 6, 2016

I am using data.table 1.9.7.
when I run df[!duplicated(df), ]in a function I get this message:

Default value of duplicated.data.table method's 'by' argument will be changed to seq_along(x) (from key(x)) from the next release to be consistent with the default behaviour of base::unique.data.frame.

How do I switch this off? I have tried suppressMessages and checked that the verbose option in data.table is off. In the duplicated documentation I can't find what data.table wants me to do now.

@jangorecki
Copy link
Member

Provide by=key(df) argument to duplicated call, you can also remove key from df - but because you do join here then adding on="oldkeycols" would be required. This messages is here to prevent from silently breaking the code on update to 1.9.8.

@arunsrinivasan
Copy link
Member

Will improve message, and probably add a global option. Thanks.

@arunsrinivasan arunsrinivasan added this to the v1.9.8 milestone Sep 12, 2016
@mattdowle
Copy link
Member

As @arunsrinivasan suggested have now added a global option and moved the message to the startup banner. See commits to close #1284. Thanks for highlighting it @carbonmetrics.

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