[R-SIG-Mac] Corrupt .RData file?

Simon Urbanek simon.urbanek at r-project.org
Mon Nov 14 15:16:49 CET 2005


John,

On Nov 13, 2005, at 10:57 PM, John Maindonald wrote:

>> Error in fun(...) : couldn't find function "assignInNamespace"
>> Error: .onLoad failed in 'loadNamespace' for 'Matrix'
>> Fatal error: unable to restore saved data in .RData
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>

The fatal error is that "Matrix" cannot be loaded, not that the image  
is corrupted. As a part of the restoring process packages are  
attached and that's what fails. Why it fails is another matter ...  
(did you upgrade the version in the meantime or something like that..?)

> After pondering the matter, I renamed the .RData file to  
> corrupt.RData,
> and fired up R.  I then found that
>
> load("corrupt.RData")
>
> worked with no problem at all.

This is because load doesn't attempt to attach packages - it simply  
restores the data regardless of whether currently attached packages  
can do something with that data... Try loading Matrix before/ 
afterwards...

Cheers,
Simon



More information about the R-SIG-Mac mailing list