Re: [R] Error with named definition argument to match.call

2014-07-15 Thread William Dunlap
> So you are saying to make sense this would need to be > > > match.call(definition=g , call=quote(g(1)) ) > g(x = 1) Yes. What would you expect to get from match.call() outside of a function if you don't give it a call argument? It uses the default value for 'call', sys.call(sys.parent()), but

Re: [R] Error with named definition argument to match.call

2014-07-15 Thread David Winsemius
On Jul 15, 2014, at 5:04 PM, William Dunlap wrote: Does it make sense to call match.call outside of a function without specifying both the function definition and the call to the function? My puzzlement came from the different response to these two commands: match.call(g) match.call(definiti

Re: [R] Error with named definition argument to match.call

2014-07-15 Thread William Dunlap
Does it make sense to call match.call outside of a function without specifying both the function definition and the call to the function? I agree that the error message is misleading. Also, the return value when call is not supplied does not seem useful, although it is possible that it is correct