brittanyblouin / ANCRTAdjust

An R package to adjust routine HIV testing data from antenatal care to reduce bias in estimating HIV prevalence trends
MIT License
2 stars 3 forks source link

ggpubr and plyr conflicting imports #3

Closed ellessenne closed 4 years ago

ellessenne commented 4 years ago

When installing the package using devtools I get some warnings regarding conflicting imports from ggpubr and plyr.

I get the same warning when running R CMD check (on a macOS 10.14.6 machine with the current release of R, 3.6.1):

* checking whether package ‘ANCRTAdjust’ can be installed ... WARNING
Found the following significant warnings:
  Warning: replacing previous import ‘ggpubr::mutate’ by ‘plyr::mutate’ when loading ‘ANCRTAdjust’

It may be due to fully importing ggpubr and plyr (e.g. in descriptive_plot.R): I think you may get away with it by importing only the functions you need, you don't need to add @import in the roxygen documentation (doing so will import the whole package).

seabbs commented 4 years ago

Just to add to this a little.

If you use @importFrom package function instead of import you will just get the functions you are using.

This is really important as it makes it clear what other functionality your package is actually relying on from other packages.

m-maheu-giroux commented 4 years ago

Great suggestion! This solved the issue of the warning message.