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

[R-Forge #5172] Create method anyDuplicated.data.table #350

Closed
arunsrinivasan opened this issue Jun 8, 2014 · 0 comments
Closed

[R-Forge #5172] Create method anyDuplicated.data.table #350

arunsrinivasan opened this issue Jun 8, 2014 · 0 comments
Assignees
Milestone

Comments

@arunsrinivasan
Copy link
Member

Submitted by: M C; Assigned to: Arun ; R-Forge link

Calling anyDuplicated on a data.table currently calls anyDuplicated.data.frame and anyDuplicated.default, when any(duplicated.data.table(.)) would be faster on large data tables.

Suggest a simple redirect to the duplicated.data.table method, which would also respect the other arguments in duplicated.data.table.

anyDuplicated.data.table(...) <- function(...) any(duplicated.data.table(...)).

Reproducible code:

a <- data.table(a = c(1,1,2), b = letters[c(1,1,2)], key = "a")
debugonce(anyDuplicated.default)
anyDuplicated(a)
@arunsrinivasan arunsrinivasan added this to the v1.9.4 milestone Jun 19, 2014
@arunsrinivasan arunsrinivasan self-assigned this Jun 20, 2014
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

1 participant