Hi Christian,

in your NAMESPACE you import both mvtnorm and mclust completely. The
warning should go away if you change this to importFrom(...) with only
the methods you actually need, in particular dmvnorm either from
mvtnorm or from mclust. Alternatively, you could leave out the imports
and always use the fully qualified names. This makes it easy to use
both mvtnorm::dmvnorm and mclust::dmvnorm in the same package.

cheerio
ralf

On Fri, Jun 28, 2019 at 1:10 PM Christian Martin Hennig
<christian.hen...@unibo.it> wrote:
>
> Dear list,
>
> I'm maintainer of the fpc package and got an email that I need to
> replace a warning that has come up. The warning is:
>
> "Warning: replacing previous import ‘mclust::dmvnorm’ by
> ‘mvtnorm::dmvnorm’ when loading ‘fpc’"
>
> Back story: A few month ago I was contacted by the maintainer of mclust
> that they now incorporate their own dmvnorm function. As dmvnorm is used
> in my package, he suggested to replace all dmvnorm by mvtnorm::dmvnorm,
> which I did. Initially this was accepted without warning by CRAN.
>
> I don't really understand what I should do about the warning. Isn't
> mvtnorm::dmvnorm the way to do this, if I want to go on using mvtnorm's
> dmvnorm function? All "dmvnorm" occurrences in my package are now
> mvtnorm::dmvnorm as intended and requested. Both mclust and mvtnorm are
> imported. The only (probably somewhat stupid) idea I have is to list the
> import of  mvtnorm before mclust in NAMESPACE (currently mclust is
> imported forst), but this seems silly to me - what if I wanted to use
> both mvtnorm::dmvnorm and mclust::dmvnorm?
>
> Any hint?
>
> Thanks,
>
> Christian
>
> --
> Christian Hennig
> Dipartimento di Scienze Statistiche "Paolo Fortunati",
> Universita di Bologna, phone +39 05120 98163
> christian.hen...@unibo.it
> currently on leave from UCL; UCL email still works
>
> ______________________________________________
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to