Joonas - as_trix85
2010-Dec-08 01:01 UTC
[R] Error in eval.with.vis(expr, envir, enclos) : subscript out of bounds
I have a for-loop in my code that calls another .R file: source("estimation.R") This file runs through without any problems, so the program completes the loop one time. However, when the loop starts a second time and it comes time to call the file "estimation.R" again, program stops and prints the following error message: "Error in eval.with.vis(expr, envir, enclos) : subscript out of bounds" This happens every time I try to run the program. What could cause it? [[alternative HTML version deleted]]
jim holtman
2010-Dec-08 11:04 UTC
[R] Error in eval.with.vis(expr, envir, enclos) : subscript out of bounds
A good time to learn how to debug R scripts. There are several references and you might start with the 'debug' package and setting options(error=utils::recover) so that when the error occurs, you get placed in the 'browser' and can look around to see what the problem is. I would assume that you do not have objects setup correctly for the second pass, but the information you have provided is insufficient since there is not a reproducible example. On Tue, Dec 7, 2010 at 8:01 PM, Joonas - as_trix85 <ast_rix85 at hotmail.com> wrote:> > I have a for-loop in my code that calls another .R file: > source("estimation.R") > > This file runs through without any problems, so the program completes the loop one time. However, when the loop starts a second time and it comes time to call the file "estimation.R" again, program stops and prints the following error message: > "Error in eval.with.vis(expr, envir, enclos) : subscript out of bounds" > > This happens every time I try to run the program. What could cause it? > > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > 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 Data Munger Guru What is the problem that you are trying to solve?
Seemingly Similar Threads
- Error in eval(expr, envir, enclos) : numeric envir arg not of length one
- Error in eval(expr, envir, enclos) : object 'x' not found
- Error in eval(expr, envir, enclos)
- ) Error in eval(expr, envir, enclos) : object '' not found
- Using nlminb for maximum likelihood estimation