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
We used to be able to do (in version 1.8.10), things like:
but now (in version 1.9.4) it gives:
I'm wondering if this is expected, and if so, what is the recommended workaround?
Thanks
Ben