Skip to content
Prev 22274 / 398502 Next

Building a function

On Thu, 1 Aug 2002, Florent BATY wrote:

            
alist(all.vars(summary(nlsED)$formula[[3]]))

is not what you think it is.  You do need to contruct an argument list.
Try this

xx <- all.vars(summary(nlsED)$formula[[3]]
xxx <- vector("list", length(xx))
names(xxx) <- xx
Args <- do.call("alist", xxx)
as.function(c(Args, summary(nlsED)$formula[[3]]))

which looks about right