Accessing the code part and modifying during execution is actually rather easy in R.
Functions such as substitute or quote are commonly used and a language expression in R is a list that you can edit and evaluate back.
The internals itself in R actually sound quite lispy: both values and codes are SEXP (S-expressions).
R is inspired by Scheme and Common Lisp; it has first-class functions, multiple dispatch.
"This decision, more than anything else, has driven the direction that R development has taken. As noted above, there are quite strong similarities between Scheme and S, and the adoption of the S syntax for our interpreter produced something which “felt” remarkably close to S."
The internals itself in R actually sound quite lispy: both values and codes are SEXP (S-expressions).
R is inspired by Scheme and Common Lisp; it has first-class functions, multiple dispatch.
https://www.stat.auckland.ac.nz/~ihaka/downloads/Interface98...
"This decision, more than anything else, has driven the direction that R development has taken. As noted above, there are quite strong similarities between Scheme and S, and the adoption of the S syntax for our interpreter produced something which “felt” remarkably close to S."