由于搜索路径上的名称冲突,如何在R中取消屏蔽功能 [英] How to unmask a function in R, due to name collisions on searchpath

查看:101
本文介绍了由于搜索路径上的名称冲突,如何在R中取消屏蔽功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我加载软件包debug来调试具有zoo对象的脚本时,我遇到了麻烦:zoo中的函数indexdebug软件包屏蔽了.我如何取消对index的遮罩?一般来说,如何处理这些名称冲突问题?我们只是不将debug软件包与`zoo'一起使用?

When I loaded package debug to debug a script with zoo objects, I got trouble: function index from zoo got masked by debug package. How can I unmask index? In general, how to deal with these name colliding problems? We just do not use debug package with `zoo'?

推荐答案

导出的符号始终可以通过::运算符识别:

Exported symbols are always identifiable with the :: operator:

zoo::index

未在名称空间中声明的隐藏函数仍可以使用:::(三元冒号)进行访问,示例为

Hidden functions not declared in the namespace can still be accessed using ::: (triple-colon), and example would be

zoo:::.onLoad

即使未导出也可以看到.

which you can see even though it is not exported.

这篇关于由于搜索路径上的名称冲突,如何在R中取消屏蔽功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆