What I mean is how do I get the R compilation or execution process to spit
out a line number with errors and warnings?

I should not have mentioned ESS, that is a distraction.

option(error=browser) is a help.  But it still does not say what piece of
code caused the error.

This is costing me a lot of time chasing down errors in mine and others
code...

Worik


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

> On 12-11-30 7:15 PM, Worik R wrote:
>
>> How?
>>
>> This is a script I am running under ess on Emacs
>>
>>
> I've never used ESS.  You'll need to ask someone on the ESS list.
>
> Duncan Murdoch
>
>  (Useful information optuion(error=recover)
>>
>> cheers
>> Worik
>>
>>
>> On Sat, Dec 1, 2012 at 12:34 PM, Duncan Murdoch
>> <murdoch.duncan@gmail.com <mailto:murdoch.duncan@gmail.**com<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 <mailto:R-help@r-project.org> mailing list
>>         https://stat.ethz.ch/mailman/_**_listinfo/r-help<https://stat.ethz.ch/mailman/__listinfo/r-help>
>>
>>         <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>
>>
>>         <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]]


