if (FALSE) { # interactive()
# Define a simple function for this example
my_func = function(a) { for (i in 1:5) { a = a + i }; return(a) }
# Enter a browser at the beginning of the function
browse(my_func, 0)
# Enter a browser at the end of the function. This allows us to inspect
# the function's local variables without having to go through the whole loop.
browse_end(my_func, 0)
}
Run the code above in your browser using DataLab