Skip to content

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

@arunsrinivasan

Description

@arunsrinivasan

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)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions