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

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

Comments

Projects
None yet
3 participants
@ghost

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

This comment has been minimized.

Show comment
Hide comment
@jangorecki

jangorecki Sep 6, 2016

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.

Member

jangorecki commented Sep 6, 2016

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

This comment has been minimized.

Show comment
Hide comment
@arunsrinivasan

arunsrinivasan Sep 12, 2016

Member

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

Member

arunsrinivasan commented Sep 12, 2016

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

@arunsrinivasan arunsrinivasan added this to the v1.9.8 milestone Sep 12, 2016

@mattdowle

This comment has been minimized.

Show comment
Hide comment
@mattdowle

mattdowle Sep 14, 2016

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.

Member

mattdowle commented Sep 14, 2016

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