I would like to do this:

f <- function(formula, data=NULL) {
 gg <- sqrt
 model.frame(formula, data=data)
 }
x <- y <- 1:10
f(y ~ gg(x))
Error in eval(expr, envir, enclos) : could not find function "gg"

Is there a simple way to get access to gg from within the model.frame invocation inside f?

Thanks
Frank

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to