How?

This is a script I am running under ess on Emacs

(Useful information optuion(error=recover)

cheers
Worik


On Sat, Dec 1, 2012 at 12:34 PM, Duncan Murdoch <murdoch.duncan@gmail.com>wrote:

> On 12-11-30 4:22 PM, Worik R wrote:
>
>> Is it possible to get a line number with an error report?
>>
>
> Yes, if the error occurs in code that has line number information.
> You get line number info by default if you use source().  If the error is
> deeply buried in code that doesn't have the info (as it may be in your
> case), then the suggestions to use options(error=recover) will offer you a
> stack trace that shows you which high level code called the function
> reporting the problem.
>
> Duncan Murdoch
>
>
>> I have a long script and an error:
>>
>> Error in `[.xts`(x, xsubset) : subscript out of bounds
>>
>>
>> It would be very helpful, and save a lot of time, if there was some
>> indication in the error message which line the error was.
>>
>> I can find it using binary search but that is a painful process.
>>
>> cheers
>> Worik
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________**________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>

	[[alternative HTML version deleted]]


