Re: [R] The three-dot question

2013-01-14 Thread Feng Li
That makes sense. Thanks! Feng On Mon, 2013-01-14 at 09:09 -0500, Mark Leeds wrote: > Hi: If you want testFun to know about b, then you would have to do > b<-list(...)$b inside > TestFun itself. But the dot dot dot argument is not really for that > purpose. > > The use of dotdotdot is for th

Re: [R] The three-dot question

2013-01-14 Thread Duncan Murdoch
On 13-01-14 6:34 AM, Feng Li wrote: Hi Michael, Thanks for the reply. On Mon, 2013-01-14 at 10:33 +, R. Michael Weylandt wrote: Hi Feng, I'm afraid I don't entirely understansd your question -- the `...` construct only allows you to pass variable numbers of arguments, not to have arbitrar

Re: [R] The three-dot question

2013-01-14 Thread Mark Leeds
Hi: If you want testFun to know about b, then you would have to do b<-list(...)$b inside TestFun itself. But the dot dot dot argument is not really for that purpose. The use of dotdotdot is for the case where a function INSIDE testFun has a formal argument named say b. Then you can pass the ... a

Re: [R] The three-dot question

2013-01-14 Thread Feng Li
Hi Michael, Thanks for the reply. On Mon, 2013-01-14 at 10:33 +, R. Michael Weylandt wrote: > Hi Feng, > > I'm afraid I don't entirely understansd your question -- the `...` > construct only allows you to pass variable numbers of arguments, not > to have arbitrary access to the parent frame

Re: [R] The three-dot question

2013-01-14 Thread R. Michael Weylandt
Hi Feng, I'm afraid I don't entirely understansd your question -- the `...` construct only allows you to pass variable numbers of arguments, not to have arbitrary access to the parent frames. You need to manually extract "b" from the dots inside of testFun. Also, it's quite frowned upon to put ##