SHANE MILLER, BLOOMBERG/ 731 LEXIN
2009-Apr-13 19:09 UTC
[R] I source an R script. An error is reported. But on what line
> 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
Gabor Grothendieck
2009-Apr-13 19:15 UTC
[R] I source an R script. An error is reported. But on what line
Try source("...whatever...", echo = TRUE, max = 9999) 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
2009-Apr-13 19:36 UTC
[R] I source an R script. An error is reported. But on what line
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?