miModifyExpr(expr, k, vnames = NULL)
NULL
then all names are replaced.
"X"
) are replaced by an expression
(e.g.
miSubscript(X,k)
).
This function is used by
miEval
. It is not intended for
direct use.
miModifyExpr(Quote(a <- x+y), 3, c("a", "x")) # If x contains three imputations, then the following # does "a <- mean(x, trim = .2)" independently for each imputation: a <- miList(list(0,0,0,0,0)) # a must exist & be an miList x <- cholesterolImpExample[[3]] for(i in 1:5) eval(miModifyExpr( Quote(a <- mean(x, trim = .2)), i, c("a","x"))) a # Same result, much simpler, just use miEval: miEval(mean(x, trim = .2))