[R] Line numbers with errors and warnings?

Steve Lianoglou mailinglist.honeypot at gmail.com
Thu Dec 6 06:33:25 CET 2012


Hi,

On Thu, Dec 6, 2012 at 12:01 AM, Worik R <worikr at gmail.com> wrote:
>
>
>> If you `source("test.R", keep.source=FALSE)`, you will see that the
>> line number is not reported.
>>
>
> Not always.
>
> I have code that uses sapply to call another function and all I get back is
> the line of the sapply.

The function that is being called inside the sapply that throws the
error -- is it in a different package?

If you reinstall *that* package w/ `options(keep.source.pkg=TRUE)` (or
R_KEEP_PKG_SOURCE=yes in your environment if installing from cmd line
(see ?options)), does that help?

If not -- could you provide, in a similar fashion as I did w/ the
BadPackage on github from an earlier message in this thread, an
example that recapitulates this "no-line-number-on-error" problem and
point out where/how it happens so we can also trigger it and see? ("I
have a function that does xxx" is hard for anybody else to help you
with).

Also, emacs/ess also has tracebug:

http://code.google.com/p/ess-tracebug/

which may be useful.

anyway ... if you are leaving R for greener pastures, do us a favor
and send us an email w/ an update if you find Nirvana in another
language ;-)

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact




More information about the R-help mailing list