As an alternative to eval_code, within could be a nice way of specifying the code. Most important thing about this function should be substitution of dynamic symbols. We need to be able to have a full control over a call.
qenv <- new_qenv() |> within(qenv, {
iris2 <- dplyr::filter(iris, {varname} = {as.character(var_value)})
})
eval_code shouldn't be discontinued, as it is still important to have a way of evaluating character or language.
Update:
within should have arguments:
expr literal R expression
code R object containing valid R expression (class - language, expression or character)
... replacement arguments similar to env in substitute
As an alternative to
eval_code,withincould be a nice way of specifying the code. Most important thing about this function should be substitution of dynamic symbols. We need to be able to have a full control over a call.eval_codeshouldn't be discontinued, as it is still important to have a way of evaluatingcharacterorlanguage.Update:
withinshould have arguments:exprliteral R expressioncodeR object containing valid R expression (class - language, expression or character)...replacement arguments similar toenvin substitute