[R] error: bad value ???

dylan boyd dylan.boyd at gmail.com
Fri Aug 15 22:16:03 CEST 2008

I'm running R 2.7.1 on Windows XP.  Lately and spontaneously, it will
give an "error: bad value" message in response to any command.  I have
to restart R to (temporarily) fix the problem.

There are two other threads I've found on the issue here:


 and here:


but neither included a fix.  The best response said that such an error
indicates corrupted memory and that some of R's basic structures were
broken.    After reading that, I tried uninstalling and reinstalling R
but the problem persists.  The same post suggested that the problem
stemmed from an add-on package, so I tried running without any
additional packages loaded, but again, "error: bad value" and a hard
reset.  I've tried running R without packages several times to no

I would include a reproduction of the problem, except that it's not
predictable nor have I been able to replicate the problem in
isolation.  I haven't observed any patterns in commands executed
leading up to the error, and I haven't made any config changes.

One last addition, and this happens much less frequently, is that R
spontaneously refuses to recognize the "<-" function.  I cannot use <-
to assign values to any variables.  Last time this happened, it was
part of a call to 'apply.'  I had previously used 'tapply' with no
problems in the same session and used 'apply' in other sessions
without this problem.  I had a much harder time searching for this in
the archives, so I don't know if this is a related or a separate

Any ideas building on those already expressed in the other posts?  Did
either of the previous authors solve the problem?

Dylan Boyd
Research Associate
United BioSource, Corp.
Lexington, MA, USA

More information about the R-help mailing list