请问R有显示代码(包括调用的其它包的函数)的每一步执行情况及执行结果的方法吗?

谢谢!

回复 第2楼 的 twinsken:能讲具体一点吗。

print() 可以打印 。。。

Duncan Murdoch 大爷的《Debugging in R》是一个不错的介绍:

http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/

我也发一个

http://www.wentrue.net/blog/?p=86

I can think of four functions in R that you can consider:

1) traceback() --- printing the call stack

2) debug() --- stepping through your function

3) browser() --- a nice alternative to 'debug'

4) trace() --- can insert debugging code at any place in function.

5) recover() --- haven't used it before, not familiar with it.

回复 第7楼 的 SnowDrop:谢谢了。