Hi All,

I need some help regarding how to set up a breakpoint in debug. For example, I 
have a very simple/naïve function (a useless function just for demo)

f = function()
{
    x = 10;
    len = 100;

    a = 1;
    for(i in 1:len)
    {
        a = a * i;
    }

y = x + a;
y;
}


If I need to debug it, I can run debug(f). After I go into the debugger, if I 
want to skip the loop and stop in the statement y = y + a, directly, how to do 
that? I know R has a function named setBreakpoint but I have never used it 
correctly.

Your help is highly appreciated.

HXD

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to