[R] Suppressing certain debugging output
Stuart Andrews
stu.andrews at gmail.com
Mon Dec 21 18:13:58 CET 2009
keywords: debug, do.call, "debugging in", suppress, arguments, list,
screen, console, output
Hi,
I would like to control the output to the console while debugging
functions that are called by do.call( FCN, ARGUMENTS ) when the
arguments are quite large. Is there a simple way to suppress (or
compress) this output?
Thanks,
- Stu
For example:
ttt = function(x) { length(x) }; debug(ttt); do.call(ttt,
list(x=rep(0,10)))
ttt = function(x) { length(x) }; debug(ttt); do.call(ttt,
list(x=rep(0,100)))
ttt = function(x) { length(x) }; debug(ttt); do.call(ttt,
list(x=rep(0,10000000)))
The first line prints the following to the console ...
debugging in: function(x) { length(x) }
(x = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
debug: {
length(x)
}
Browse[1]>
The second prints ...
debugging in: function(x) { length(x) }
(x = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
debug: {
length(x)
}
Browse[1]>
Etc.
Etc.
More information about the R-help
mailing list