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_ri...@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@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? ______________________________________________ R-help@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.