FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[R-Forge #1841] Implement a fast droplevels.data.table method. · Issue #647 · Rdatatable/data.table · GitHub

[R-Forge #1841] Implement a fast droplevels.data.table method. #647

Description

Submitted by: Steve Lianoglou; Assigned to: Nobody; R-Forge link

The default droplevels.data.frame function is invoked on a call to droplevels on a data.table. This results in borken output from droplevels, eg. as reported by pchalasani on the ML:

d <- data.table(name = c('a','b','c'), value = 1:3)
dt <- data.table(d)
setkey(dt,'name')
dt1 <- subset(dt,name != 'a') # or dt1 <- dt[ name != 'a' ]

dt1
name value
[1,] b 2
[2,] c 3

droplevels(dt1)
name value
[1,] b 1
[2,] c 3

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL