Submitted by: Eduard Antonyan; Assigned to: Nobody; R-Forge link
Here's an example:
rm(dt)
rm(dt1)
dt = data.table()
dt[, {dt1 = data.table(a = 1:4); eval(parse(text = 'dt1[, a := 2]'))}]
Error in eval(expr, envir, enclos) : object 'dt1' not found
It works fine without the eval/parse:
dt[, {dt1 = data.table(a = 1:4); dt1[, a := 2]}]
old and bad example, left here for reference
dt = data.table()
dt[, {eval(parse(text = 'print("boo")')); NULL}]
NULL
Pretty sure this is a recently introduced bug and it used to work before.
Submitted by: Eduard Antonyan; Assigned to: Nobody; R-Forge link
Here's an example:
rm(dt)
rm(dt1)
dt = data.table()
dt[, {dt1 = data.table(a = 1:4); eval(parse(text = 'dt1[, a := 2]'))}]
Error in eval(expr, envir, enclos) : object 'dt1' not found
It works fine without the eval/parse:
dt[, {dt1 = data.table(a = 1:4); dt1[, a := 2]}]
old and bad example, left here for reference
dt = data.table()
dt[, {eval(parse(text = 'print("boo")')); NULL}]
NULL
Pretty sure this is a recently introduced bug and it used to work before.