From sfalcon at fhcrc.org  Thu Feb  2 20:32:42 2006
From: sfalcon at fhcrc.org (Seth Falcon)
Date: Thu, 02 Feb 2006 11:32:42 -0800
Subject: [Rd] The install.R and R_PROFILE.R files
In-Reply-To: <Pine.LNX.4.61.0602020703420.9210@gannet.stats> (Brian Ripley's
	message of "Thu, 2 Feb 2006 07:45:55 +0000 (GMT)")
References: <Pine.LNX.4.61.0601311817010.20339@gannet.stats>
	<m2ek2mdgvy.fsf@fhcrc.org>
	<Pine.LNX.4.61.0602020703420.9210@gannet.stats>
Message-ID: <m2lkwta751.fsf@ziti.local>

Thanks for the explaination of LazyLoad, that's very helpful.

On  1 Feb 2006, ripley at 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.

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

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

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

Looking at the NAMESPACE for the graph package, it looks like it is
missing some imports.  I added lines:
  import(Ruuid)
  exportClasses(Ruuid)

Aside: am I correct in my reading of the extension manual that if one
uses S4 classes from another package with a namespace, one
must import the classes and *also* export them?

Now I see this:

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

But Ruuid _is_ defined and exported in the Ruuid package.

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

Thanks,

+ seth



[Rd] The install.R and R_PROFILE.R files
Seth Falcon