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 #5442] Possible wrong assignment to list columns #35

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

[R-Forge #5442] Possible wrong assignment to list columns #35

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

Comments

@arunsrinivasan
Copy link
Member

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

Hello, please consider the following two assignments to an element of a list column, which I think should not give the same result:

library(data.table)
dt <- data.table(id=1:2, comment=vector(mode="list", length=2))

dt[1L, comment := 1]
a<-dt$comment
dt[1L, comment := list(list(1))]
b<-dt$comment  

> identical(a, b)
# [1] TRUE

This possible bug came up after a Arun's answer on SO:

@arunsrinivasan arunsrinivasan added this to the v1.9.4 milestone Jun 19, 2014
@arunsrinivasan arunsrinivasan self-assigned this Jun 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant