Skip to content
Back to formatted view

Raw Message

Message-ID: <200903111622.n2BGM3PH017933@williams.wu-wien.ac.at>
Date: 2009-03-11T16:22:07Z
From: Wolfgang Koller
Subject: Using a NAMESPACE or the Imports field in DESCRIPTION?

Hello list,

I am writing a package which builds on a function ("foo") of another 
package. I only need that particular function. What is the state of 
the art to do this? Do I need a NAMESPACE file in my package? 
Currently I still don't have one. Or can I do this with the Imports 
field in my DESCRIPTION file? Reading chapter 1 of the "Writing R 
Extensions" manual I do not completely understand for what situations 
these two alternatives are intended for. The manual says that with 
the Imports field of DESCRIPTION I can "import the name space" of 
another package. What does that mean? What are the differences 
between the two alternatives? Are there consequences for how I can 
access function "foo" within the code of my package?

Thanks for some clarifications and recommendations!

Wolfgang Koller