Suppose I have the following language object:
lang <- quote( f(x=a) )
and I want to substitute in 1 for a. How
1
a
You can use substituteDirect rather than substitute:
substituteDirect
substitute
substituteDirect(lang, list(a=1))
Eventually you may be able to use substitute. According to ?substituteDirect:
?substituteDirect
The goal is to replace this with an eval= argument to substitute.
eval=