[R] how do you know which functions are being debugged?

Yihui Xie xieyihui at gmail.com
Fri Oct 23 20:02:27 CEST 2009

list all objects first; use a loop (explicitly or not) to check
whether (1) your objects are functions (2) functions are debugged

> f = function(x) x
> g = 1
> x = ls()
> debug(f)
> sapply(x[sapply(x, function(i) is.function(get(i)))], isdebugged)
> undebug(f)
> sapply(x[sapply(x, function(i) is.function(get(i)))], isdebugged)

Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-6609 Web: http://yihui.name
Department of Statistics, Iowa State University
3211 Snedecor Hall, Ames, IA

On Fri, Oct 23, 2009 at 12:28 PM, Andrew Yee <yee at post.harvard.edu> wrote:
> This is kind of a dumb question:  I know you can use isdebugged() to find
> out if a specific function is flagged for debugging, but is there a way to
> list all the functions that are flagged for debugging?
> Thanks,
> Andrew
>        [[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list