[Rd] SaveImage, LazyLoad, S4 and all that {was "install.R ... files"}

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Fri 03 Feb 2006 - 09:41:25 GMT

>>>>> "Seth" == Seth Falcon <sfalcon@fhcrc.org> >>>>> on Thu, 02 Feb 2006 11:32:42 -0800 writes:

    Seth> Thanks for the explaination of LazyLoad, that's very helpful.     Seth> On 1 Feb 2006, ripley@stats.ox.ac.uk wrote:
>> There is no intention to withdraw SaveImage: yes. Rather, if
>> lazy-loading is not doing a complete job, we could see if it could
>> be improved.

    Seth> It seems to me that LazyLoad does something different with respect to     Seth> packages listed in Depends and/or how it interacts with namespaces.

    Seth> I'm testing using the Bioconductor package graph and find that if I     Seth> change SaveImage to LazyLoad I get the following:

Interesting.

I had also the vague feeling that saveImage was said to be important when using S4 classes and methods; particularly when some methods are for generics from a different package/Namespace and other methods for `base' classes (or other classes defined elsewhere).
This is the case of 'Matrix', my primary experience here. OTOH, we now only use 'LazyLoad: yes' , not (any more?) 'SaveImage: yes' -- and honestly I don't know / remember why.

Martin

    Seth> ** preparing package for lazy loading
    Seth> Error in makeClassRepresentation(Class, properties, superClasses, prototype,  : 
    Seth> couldn't find function "getuuid"              

    Seth> Looking at the NAMESPACE for the graph package, it looks like it is
    Seth> missing some imports.  I added lines:
    Seth> import(Ruuid)
    Seth> exportClasses(Ruuid)
    Seth> Aside: am I correct in my reading of the extension manual that if one
    Seth> uses S4 classes from another package with a namespace, one
    Seth> must import the classes and *also* export them?

    Seth> Now I see this:

    Seth> ** preparing package for lazy loading
    Seth> Error in getClass("Ruuid") : "Ruuid" is not a defined class
    Seth> Error: unable to load R code in package 'graph'
    Seth> Execution halted   

    Seth> But Ruuid _is_ defined and exported in the Ruuid package.

    Seth> Is there a known difference in how dependencies and imports are     Seth> handled with LazyLoad as opposed to SaveImage?

    Seth> Thanks,

    Seth> + seth



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri Feb 03 20:47:26 2006

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 03:21:40 GMT