[Rd] Question about selective importing of package functions...

Duncan Murdoch murdoch.duncan at gmail.com
Mon Oct 21 00:47:44 CEST 2013


On 13-10-20 6:41 PM, Jonathan Greenberg wrote:
> To be clear, if I used Depends: somepackage before, and switched over to
> using Imports: somepackage, I'll need to mod my code that used to have a
> call to, say, somefunction to now have somepackage::somefunction, correct?

No.  You need to modify both the DESCRIPTION file as you say above, and 
the NAMESPACE file to say what to import.  Once you do that, those 
functions will appear to your own package functions without any prefix 
needed.

Duncan Murdoch

>
> --j
>
>
> On Sun, Oct 20, 2013 at 5:34 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
>>
>> On 20 October 2013 at 16:20, Jonathan Greenberg wrote:
>> | One more follow-up -- will I now need to include a library() statement in
>> | each function?
>>
>> No.
>>
>> NAMESPACE entry, coupled with Imports: in DESCRIPTION.
>>
>> Dirk
>>
>> --
>> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
>>
>
>
>



More information about the R-devel mailing list