Skip to content

[R-Forge #5205] duplicated.data.table should have a "fromLast" argument similar to base #347

Closed

Description

@arunsrinivasan

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

As the title implies...

On data.frames:

set.seed(450)
df <- data.frame(x=sample(2, 10,TRUE), y=sample(3, 10, TRUE))

duplicated(df)
#  [1] FALSE FALSE FALSE  TRUE FALSE  TRUE FALSE  TRUE  TRUE  TRUE
duplicated(df, fromLast=TRUE)
#  [1]  TRUE  TRUE  TRUE FALSE FALSE FALSE  TRUE  TRUE FALSE FALSE

On data.tables:

require(data.table)
dt <- data.table(df)
duplicated(dt)
#  [1] FALSE FALSE FALSE  TRUE FALSE  TRUE FALSE  TRUE  TRUE  TRUE

But, doesn't have a fromLast parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions