Browse an Object - Generic function

DESCRIPTION:
Allows the user to inspect the contents of an object or function frame.

This function is generic (see Methods); method functions can be written to handle specific classes of data. Classes which already have methods for this function include: tree.


USAGE:
browser(object, ...)

OPTIONAL ARGUMENTS:
object:
an integer, specifying one of the current evaluation frames, or an S-PLUS object. If no arguments are given, browser.default browses in the evaluation frame from which browser is called.
...:
methods may have additional arguments.

SIDE EFFECTS:
the user is put into a special state that allows browsing.

When the browser is called with an integer argument, or no argument, it has direct access to a frame in the evaluator. Assignments and replacements have a lasting effect in that frame after the browser exits. This allows interactive change to the behavior of a function; be sure that is what you mean if you do assignments under these conditions. Note that read-only access to a frame in the evaluator is obtained by browser(sys.frame(n)) which invokes the browser on a copy of the n-th frame. For further details and explicit control of this feature, see browser.default.


DETAILS:
The browser methods allow the user to explore and possibly change an object or function frame. The inspect function now provides a more general interactive debugging environment, including browsing and tracing, together with most of the functionality of the debugger function.

SEE ALSO:
browser.default , inspect , restart , debugger , trace , dump.calls .

EXAMPLES:
trace(foo, browser)

options(interrupt=browser)

myfun <- function(x,y) { # lots of computing browser() #now check things just before the moment of truth .C("myroutine",x,y,w) }