Re: [R] How to make a function aware of its own call arguments

2016-03-24 Thread sbihorel
Thanks for the precision. On 3/24/2016 10:40 AM, Duncan Murdoch wrote: On 24/03/2016 10:28 AM, sbihorel wrote: Hi, Thanks for your suggestion. missing(x) works only if x is not altered within the function, which is not the case in my actual function (which is more complex than the example fun

Re: [R] How to make a function aware of its own call arguments

2016-03-24 Thread S Ellison
> Are you aware of any function what would query the original function call > arguments no matter what happens in the function? Use missing() first. If you can't use missing() first, or use it early in a parent function and pass a flag, you could perhaps pass a copy of the parent function call t

Re: [R] How to make a function aware of its own call arguments

2016-03-24 Thread Duncan Murdoch
On 24/03/2016 10:28 AM, sbihorel wrote: Hi, Thanks for your suggestion. missing(x) works only if x is not altered within the function, which is not the case in my actual function (which is more complex than the example function I send in my previous post). That's not quite true: missing(x) w

Re: [R] How to make a function aware of its own call arguments

2016-03-24 Thread sbihorel
Hi, Thanks for your suggestion. missing(x) works only if x is not altered within the function, which is not the case in my actual function (which is more complex than the example function I send in my previous post). Are you aware of any function what would query the original function call

Re: [R] How to make a function aware of its own call arguments

2016-03-24 Thread Jeff Newmiller
Don't provide a default value for c in the parameter list. Then you can use the missing() function to make decisions, including whether to generate a default value for c or not. -- Sent from my phone. Please excuse my brevity. On March 24, 2016 5:11:43 AM PDT, sbihorel wrote: >Hi, > >Please