[R] I source an R script. An error is reported. But on what line

jim holtman jholtman at gmail.com
Mon Apr 13 21:36:43 CEST 2009


Add this to your startup so that all errors are caught and the
statement and calling stack are printed out.  This aids a lot in
debugging, especially when using scripts:

options(error=utils::recover)


On Mon, Apr 13, 2009 at 3:09 PM, SHANE MILLER, BLOOMBERG/ 731 LEXIN
<smiller53 at bloomberg.net> wrote:
>> source("C:\\Documents and Settings\\smiller53\\Desktop\\perf.r")
> Error in eval.with.vis(expr, envir, enclos) : element 1 is empty;
>   the part of the args list of 'c' being evaluated was:
>
> perf.r is a long script. how can I determine which line the error occurred on?
>
> TIA, SHane
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?




More information about the R-help mailing list