Reputation: 57
I am using the debug package in r to debug my code. I am testing the mtrace function in debug:
> require(debug)
Loading required package: debug
Loading required package: tcltk
> mtrace(ft.debug)
after that, the packages's author claims, if you invoke any function, a window will open where the code is displayed with numbered lines:
> fix(ft.debug)
ft.debug is test function whose code is:
function(){
print("R is the most wonderful thing in the world")
}
but there is only the normal r function editor window: there is no numbered window.
How do I get the numbered window?
Upvotes: 0
Views: 25
Reputation: 3914
mtrace() only sets the debugging mode. You need to call the function after that:
require(debug)
ft.debug<- function(){
print("R is the most wonderful thing in the world")
}
mtrace(ft.debug)
ft.debug()
Upvotes: 2