[R] do.call, browser and traceback

hadley wickham h.wickham at gmail.com
Thu Feb 23 20:39:38 CET 2006


> 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 the
> deparse length, but I have to say that quite often the useful information
> is well down the list of arguments.  There is currently no user control.

It would be nice to have some user control - I find the first 100
characters or so is usually sufficient, especially when the real
problem is further down the stack.  It is a real pain when you have
used do.call with a 10,000 row dataframe - and then it is basically
impossible to find the problem by manual inspection anyway.  Even
limiting to 1000 characters would be a big improvement.

Hadley




More information about the R-help mailing list