[R] debugging R

Gabor Grothendieck ggrothendieck at gmail.com
Sun Feb 5 09:37:38 CET 2012

On Sun, Feb 5, 2012 at 3:01 AM, Alaios <alaios at yahoo.com> wrote:
> Dear all,
> I am using browse() to debug my R applications. My problem is that I need a bit more control of the debugging process.
> For example 'I want R to stop at the 7th iteration and check. One can do think that I can put the browse inside an if statement but this limits by lot the flexibility one can have.

Its not clear what the flexibility limitation you have in mind is.
This seems similar with the small advantage that the debugging code is
confined to the browser statement itself:

> for(i in 1:10) { print(i); browser(expr = i==7) }
[1] 1
[1] 2
[1] 3
[1] 4
[1] 5
[1] 6
[1] 7
Called from: top level

Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

More information about the R-help mailing list