Fair enough. I'm not going to post all the code because it's distracting, but
the following example function is demonstrative of the problem:

exfun<-function(...){
 print(x)
}

I'm aware that leaving making the only inputs additional arguments is bad
form, but this is merely an example. So here if I call exfun as follows:

exfun(x=2)

I get "Error in print(x) : object 'x' not found". I guess this makes sense
since the additional arguments aren't really meant to be used like that, but
what I would like to know is how I would access the variable passed in the
additional arguments in exfun given that I know the name (which I can access
through sys.call). I hope that was helpful :/. Thanks!




Charles C. Berry wrote:
> 
> I did not follow that.
> 
> But I might guess that you do not grok what
> 
>       mf <- eval(mf, parent.frame())
> 
> is doing in lm(). If so, then you _really_ need to spend some time working 
> that through before attempting a customized argument matching scheme.
> 
> In any case, the suggestion to "provide commented, minimal, 
> self-contained, reproducible code" is often helpful to folks who read this 
> list in showing what you intend and provides a basis for discussion - even 
> if your code is incomplete or doesn't do quite what you want it to do.
> 
> 
> HTH,
> 
> Chuck
> 

-- 
View this message in context: 
http://www.nabble.com/Passing-additional-arguments-through-%27...%27-tp24501159p24537455.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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