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 #5296] Class lost when selecting columns #64

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

[R-Forge #5296] Class lost when selecting columns #64

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

Comments

@arunsrinivasan
Copy link
Member

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

When selecting columns via j argument in [.data.table, the custom class is lost.

DT <- data.table(a=1:2,b=3:4)
setattr(DT, "class", c("newclass", class(DT)))

class(DT) # [1] "newclass"   "data.table" "data.frame"
class(DT[, list(a)]) # [1] "data.table" "data.frame"  ##### "newclass" lost

This might be related to #5293

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