R package selective import and namespace

My question is: How do I selectively import functions from two packages in the case where two of the packages have functions named DanielPlot (which is one of the functions I wish to import). I would like to import the DanielPlot function from the FrF2 package, but the BsMD package also has a function called DanielPlot. I tried selectively importing the functions I want from each package, but it does not work. A portion of my DESCRIPTION file is below:

Depends: 
         lattice

Imports: FrF2, 

         BsMD

and a portion of my NAMESPACE file is:

import(lattice)
importFrom(FrF2,DanielPlot)    
importFrom(FrF2, IAPlot)    
importFrom(FrF2, MEPlot)    
importFrom(FrF2, pb)    
importFrom(FrF2, FrF2)    
importFrom(BsMD, BsProb)    
importFrom(BsMD, LenthPlot)    
importFrom(BsMD, BsMD)

When I try to check the package I get the message

Warning messages: replacing previous import by 'BsMD::DanielPlot' when loading 'daewr'

How can I avoid this warning?

链接地址: http://www.djcxy.com/p/91602.html

上一篇: 通过RStudio访问参考类的方法时引发警告

下一篇: R包选择性导入和命名空间