Hi Li, I'm cc'ing bioc-devel because others might find this useful. You asked:
On 25 Oct 2005, lilong at isb-sib.ch wrote:
After removing zzz.R, how/where is the functionality achieved to load various required libs? The NAMESPACE part doesn't say anything about required libs, does it? Since I'm preparing a new package, I'd like to make it as close to the current standard as possible before handing it to you.
All packages listed in the Depends field of a package's DESCRIPTION file will be attached prior to the package being attached. If your package has a NAMESPACE (and it should!) then you have a choice between listing a package in Depends and listing it under Imports in DESCRIPTION. Packages listed under Imports will not be automatically attached and must be imported in the NAMESPACE file. This will cause those packages (or portions thereof if using importFrom) to be loaded but not attached. In most cases, you should not need to make any calls to require() or library() from your R code (there are exceptions, especially when you are providing optional functionality). One more note on using NAMESPACE files: .First.lib is not called. Use .onLoad instead. However, since you can specify imports and dyn libs inside NAMESPACE, there is often no need for .onLoad. Hope that helps. Let me know if I can clarify anything further. Best, + seth