Skip to content
Prev 11531 / 398502 Next

environments

I don't have your problems, usually I can define functions inside functions
without problems. Maybe it's the R version... However, perhaps you can
simply define the function Cexp out of MyTop, thus having it visible
"globally". Try this:

Cexp <- function(dose,A,B,m){...}

MyTop <- function(data=dta) {
     Model <- as.formula(paste("y","~ Cexp(",paste(formals(Cexp),collapse
=", "),")"));
     MyCall <- call("gnls",Model,dta,...);
     eval(MyCall)
}

Bye,
Alessio

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._