Thanks for your kind response Duncan. To be more specific, I'm using the
function mvrnorm from MASS. The issue is that MASS depends on survival and
I have a function in my package named tt() which conflicts with a function
in survival of the same name. I can think of 2 alternatives solutions to my
problem, but I'm to an expert:

1) Copy mvrnorm into my package, which I thought was not a good idea
2) Rename my tt() function to something else in my package, but this is
painful as I have it all over the place in other functions.

Any suggestions would be much appreciated.

Best,
Axel.


On Mon, Dec 30, 2013 at 7:51 PM, Duncan Murdoch <murdoch.duncan@gmail.com>wrote:

> On 13-12-30 1:24 PM, Axel Urbiz wrote:
>
>> Dear users,
>>
>> My package {foo} depends on a function "miscFUN" which is on package
>> {foo_depend}. This last package also depends on other packages, say {A, B,
>> C}, but miscFUN is not dependent on A, B, C (only on foo_depend).
>>
>> In my package {foo}, is there a way to only have it depend on the function
>> miscFUN from {foo_depend} without having the user to have installed A, B,
>> C? (as none of those packages are needed for my package to work properly).
>> Also, is this a best practice?
>>
>
> There's no way for your package to tell R to ignore the dependencies
> declared by foo_depend.
>
> If you really only need one function from that package, simply copy the
> source of miscFUN into your package (assuming foo_depend's license permits
> that).  But this is not best practice, unless that function is very simple.
>  Best practice is to declare your dependence by importing that function
> from foo_depend.
>
> Duncan Murdoch
>
>
>

	[[alternative HTML version deleted]]

