[R] identify object that causes "Error in loadNamespace(name) : there is no package called ‘R.utils’"

Liviu Andronic landronimirc at gmail.com
Thu Apr 25 09:46:01 CEST 2013


Dear Duncan,


On Wed, Apr 24, 2013 at 11:04 PM, Duncan Murdoch
<murdoch.duncan at gmail.com> wrote:
>> What I've done sometimes in debugging is to change that error to a
>> warning in the getNamespace() function, and add some tracing code to the
>> serialization code to print the names of objects as they are loaded.
>> (This goes in ReadItem in src/main/serialize.c.)
>>
>> I wouldn't expect Liviu to make those changes, but perhaps a "verbose"
>> option could be added to load(), so that it could be available to users.
>
> I have added this in R-devel.  The format of the printed output may well
> change before this is ever released, but it should be enough to identify the
> bad item already.
>
> You'll need a build of R-devel from r62658 or newer to see this.  Then
>
> load("/tmp/a.rda", verbose=TRUE)
>
> will print the names of objects as they are read (the names are read after
> the attributes and before the value).  If you want to see reams of mostly
> useless information, you can try verbose=n (for some number n=2 or more);
> this prints names and component numbers to a greater depth.
>
Thank you for adding this in R. I will likely test this feature when
it gets released.

Best regards,
Liviu



More information about the R-help mailing list