Skip to content
Back to formatted view

Raw Message

Message-ID: <AANLkTimr2DpZiAoS0OwOxsokqnPDkCBsGN6Kr8KGyRV6@mail.gmail.com>
Date: 2010-12-08T11:04:57Z
From: jim holtman
Subject: Error in eval.with.vis(expr, envir, enclos) : subscript out of bounds
In-Reply-To: <SNT138-w649695A8114A59003C6FAD982D0@phx.gbl>

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?