【发布时间】:2016-10-29 01:28:51
【问题描述】:
我的问题是,在我的导入中有两个包具有名为 alpha 的函数,但在我的代码中,我只使用包 ggplot2 中的那个(另一个包是 psychometric)。检查后我收到了这个警告:
警告:在加载“mypackage”时,用“psychometric::alpha”替换之前的导入
描述文件:
Imports: deltaPlotR, difNLR, difR, foreign, ggplot2, gridExtra, ltm, moments, nnet, psychometric, reshape2, shiny, shinyAce
命名空间文件:
import(shiny,
shinyAce,
moments,
foreign,
nnet,
ggplot2,
reshape2,
ltm,
psychometric,
difR,
deltaPlotR,
gridExtra,
difNLR)
虽然我使用了两个包中的很多功能(ggplot2 和 psychometric)
我尝试使用import(psychometric, exclude = alpha),但出现错误:
错误
不需要命名空间依赖:'alpha'
【问题讨论】:
-
我们可以用它的全名来调用这个函数:
ggplot2::alpha() -
@zx8754 谢谢,这是我需要的:)
标签: r namespaces