[英]Load a function from a specific package
I'm loading two R packages Hmisc
and TeachingDemos
, which both contain a function called subplot()
. 我正在加载两个R包Hmisc
和TeachingDemos
,它们都包含一个名为subplot()
的函数。 I load the package Hmisc
first and it seems that afterwards the subplot()
-function from Hmisc
is used. 我首先加载包Hmisc
,然后似乎使用来自Hmisc
的subplot()
函数。 This happens even when I load the library TeachingDemos
first. 即使我首先加载了TeachingDemos
库,也会发生这种情况。
How can I use the function subplot()
from the TeachingDemos
package, even if the Hmisc
package is also loaded? 我如何使用TeachingDemos
包中的函数subplot()
,即使还加载了Hmisc
包?
您可以使用::
运算符指定要使用的函数,如...
TeachingDemos::subplot()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.