Imports - functions with the same name but from different package

553 views Asked by At

I'm working on update of my package. However I'm struggling with dependencies/imports. I use two conflicted packages - ggplot2 and psych and their functions alpha and of course alpha object of ggplot2 differs from alpha function of psych package.

When building package I get an warning:

Warning: replacing previous import 'ggplot2::alpha' by 'psych::alpha' when loading 'ShinyItemAnalysis'

Hence I wont be able to publish my package on CRAN (untill I solved this warning). Is there any easy way how to avoid this import conflict?

1

There are 1 answers

0
Jan Netík On

Note that when using roxygen2 package to build NAMESPACE from fellow .R scripts, it is very helpful to delete the NAMESPACE file and run roxygen2 again. Solves many problems.