开发者

debugging a function in R that was not exported by a package

I would like to step through, using debug() or trace(), a function that was not exported. For example, how can I do it for vcov.polr of the package MASS, which is called from the function polr. polr is exported, but vcov.polr is not.

That is, when I run polr, I would like the debug browser to start once the code enters vcov.polr开发者_StackOverflow.


try

debug(MASS:::vcov.polr)

note that three colon ::: make the hidden object in a package visible.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜