I realize that tidy evaluation does not use lexical scoping, but I want the quasiquotation in rlang
to look for symbols in the environment I decide.
Current behavior:
envir <- new.env(parent = globalenv())
eval(parse(text = "little_b <- 'b'"), envir = envir)
eval(rlang::expr(!!little_b), envir = envir)
## Error in (function (x) : object 'little_b' not found
Instead, I want the last line to return "b"
. Bonus points if you find a version of eval()
that does the job here AND works like evaluate::try_capture_stack()
.
FYI: I am trying to solve this issue.