Re: [R] do.call, browser and traceback

2006-02-23 Thread hadley wickham
If f is long then you can get some savings like this: do.call(f, mtcars) # note: used f rather than f Unfortunately, my f is a character vector containing the function I want to call. Thanks for the idea though. Hadley __

Re: [R] do.call, browser and traceback

2006-02-23 Thread Prof Brian Ripley
On Mon, 20 Feb 2006, hadley wickham wrote: A problem that I've encountered when using do.call a lot is very large stack traces, eg: f - function(x) stop() do.call(error, mtcars) traceback() f - function(x) browser() do.call(f, mtcars) Did you mean that? Both are errors. Perhaps f -

Re: [R] do.call, browser and traceback

2006-02-23 Thread hadley wickham
Did you mean that? Both are errors. Perhaps f - function(...) browser() do.call(f, mtcars) Sorry, yes, that is what I meant. What is being used is Rprintf(Called from: ); PrintValueRec(cptr-call,rho); in src/main/main.c. We could certainly allow an option to limit

[R] do.call, browser and traceback

2006-02-20 Thread hadley wickham
A problem that I've encountered when using do.call a lot is very large stack traces, eg: f - function(x) stop() do.call(error, mtcars) traceback() f - function(x) browser() do.call(f, mtcars) I have hacked together my own version of traceback to fix this by limiting the length of each line to 80

Re: [R] do.call, browser and traceback

2006-02-20 Thread Gabor Grothendieck
If f is long then you can get some savings like this: do.call(f, mtcars) # note: used f rather than f This does not solve the whole problem but its a step. On 2/20/06, hadley wickham [EMAIL PROTECTED] wrote: A problem that I've encountered when using do.call a lot is very large stack