[R] Using functions within functions (environment problems)

2007-01-26 Thread Colin Beale
Hi everyone, I've been having difficulty writing wrapper functions for some functions where those same functions include other functions with eval() calls where the environment is specified. A very simple example using function lmer from lme4: lmerWrapper - function(formula, data, family =

Re: [R] Using functions within functions (environment problems)

2007-01-26 Thread Gabor Grothendieck
Check out this post and the entire thread to which it belongs: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/67474.html On 1/26/07, Colin Beale [EMAIL PROTECTED] wrote: Hi everyone, I've been having difficulty writing wrapper functions for some functions where those same functions include

Re: [R] Using functions within functions (environment problems)

2007-01-26 Thread Prof Brian Ripley
I don't think your subject line is relevant. You do not have 'functions within functions': lmerFrames is not within lmer. (You seem to be confusing functions within and calls from.) Your example does not work (did you test it?). When the erroneous runif call is corrected (it gives a result