Skip to content

Broken when subsetting data table #871

Closed

Description

@sunnyghk

Recently I have upgraded to data.table 1.9.4, and notice the subsetting is broken when the column name is 'class'. It can be resolve by setting datatable.auto.index to FALSE, but nonetheless is causing a pretty major problem:

test = data.table(class=c('a','b'), x=c(1,2))
test[class=='a']
Error in setattr(attr(x, "index"), paste(cols, collapse = "__"), o) :
attempt to set invalid 'class' attribute
options(datatable.auto.index=FALSE)
test[class=='a']
class x
1: a 1

Activity

  1. added this to the v1.9.6 milestone on Oct 8, 2014
  2. mattdowle commented on Oct 8, 2014

    @mattdowle
    Member

    Thanks for the nice report. Fixed and closed by 4aa7c0c

  3. self-assigned this
    on Oct 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions