Use character string as function argument

You can use eval and parse:

foo <- eval(parse(text = paste("mean(x,", myoptions, ")")))

Leave a Comment