Message-ID: <50B953B1.9040703@gmail.com>
Date: 2012-12-01T00:47:45Z
From: Duncan Murdoch
Subject: Line numbers with errors and warnings?
In-Reply-To: <CAG1tYw+TthVRYSBz=omkiQvv0mpf2Ae6hLxwn5pVAFstnu7heA@mail.gmail.com>
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 at gmail.com <mailto:murdoch.duncan at 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 at r-project.org <mailto:R-help at 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.
>
>
>