From benjamin.hofner at imbe.med.uni-erlangen.de  Tue Apr 15 15:12:16 2014
From: benjamin.hofner at imbe.med.uni-erlangen.de (Benjamin Hofner)
Date: Tue, 15 Apr 2014 15:12:16 +0200
Subject: [Rd] Problem: Importing two packages which export a function with
 the same name
Message-ID: <534D3030.40303@imbe.med.uni-erlangen.de>

Hi all,

I am currently updating our package gamboostLSS which depends on package 
mboost *and* on package gamlss.dist. From mboost we use a lot of the 
fitting infrastructure and from gamlss.dist we obtain the relevant loss 
functions (aka families) used for fitting and corresponding quantile 
functions. Furthermore, we use the Family() function from package mboost.

However, if I depend on both packages, mboost::Family is always masked 
by a function of the same name from package gamlss.dist.

I tried to change the order of mboost and gamlss.dist in both my 
NAMESPACE and my DESCRIPTION file but couldn't see any difference in the 
result: gamlss.dist is always loaded after mboost and thus it breaks my 
code.

Actually, I would love to use something similar to importFrom() with a 
pattern that excludes Family, i.e.,

importFrom(gamlss.dist, exclude_pattern = "Family")

or the same with an include pattern designed to exclude Family in my 
NAMESPACE. Is this possible anyhow?

As gamlss.dist keeps evolving over time with more families to be added, 
I cannot manually importFrom(...) all the relevant families. I would 
have to change the list of functions all the time.

Thanks and all the best,
Benjamin



[Rd] Problem: Importing two packages which export a function with the same name
Benjamin Hofner