[英]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.