Skip to content
Prev 20214 / 63424 Next

type converters not being saved to workspace

On Tue, 11 Apr 2006, John Chambers wrote:

            
I am sorry, but that is not the case: see ?Startup. The image is loaded 
_before_ the packages are attached (as documented).  You can check 
explicitly by

env R_DEFAULT_PACKAGES=NULL R --restore
# R starts and loads the workspace
and it still does not work (as I had tried before answering).
Yes, but it will not help here as the objects are loaded without methods 
being loaded.

I hope one day when we have S4 objects marked in the object headers that 
loading such an object will load and attach the methods package.
Definitely.

I think that package methods needs to cache metadata in its .onAttach not 
.onLoad.  In principle it affects anything setting methods for generics in 
package:methods, but if this is done in a package, the dependency on 
methods will ensure that methods is loaded before the package, and then 
library() will run cacheMetaData on the package.