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

eval(, envir=.SD) no longer working #880

Closed
tyner opened this issue Oct 12, 2014 · 1 comment
Closed

eval(, envir=.SD) no longer working #880

tyner opened this issue Oct 12, 2014 · 1 comment
Assignees
Milestone

Comments

@tyner
Copy link

tyner commented Oct 12, 2014

We used to be able to do (in version 1.8.10), things like:

DT <- as.data.table(iris)
DT$foo <- "Species"
DT[,bar:=eval(parse(text=foo[1]), envir=.SD)]

but now (in version 1.9.4) it gives:

Error in parse(text = foo[1]) : object 'foo' not found

I'm wondering if this is expected, and if so, what is the recommended workaround?

Thanks
Ben

@arunsrinivasan
Copy link
Member

@tyner thanks for the report. Should be back to how it was now.

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

2 participants