``` r d = data.table(a = 1) q = quote(.(a)) d[, eval(q)] # a #1: 1 d[, 1, by = .(a)] # a V1 #1: 1 1 # the problem d[, 1, by = eval(q)] #Error in eval(expr, envir, enclos) : could not find function "." ```
Activity
franknarf1 commentedon Jul 30, 2019
Somehow this is happening again in this SO example: https://stackoverflow.com/q/57253159/1191259
jangorecki commentedon Jul 30, 2019
parse return an
expressioncall, it will work by adding[[1L]]I don't think it qualify for re-opening, it is easy to investigate what is being passed to
eval.