[英]Is it possible to @inheritParams from a function within another package?
[英]Is it possible to get notified when a package is loaded within another package or function?
我正在为我的程序包编写一个函数,其目的是在加载某个程序包时得到通知,以便它可以对程序包的加载做出响应。 它与.onLoad()
相似,只是它是对其他软件包的响应。
在R中可以这样做吗?
好的,我通过使用setHook()
弄清楚了。
setHook(packageEvent("pkg", "attach"),
function(...) {
message('hooked')
} )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.