Session               package:methods               R Documentation

_S_e_s_s_i_o_n _D_a_t_a _a_n_d _D_e_b_u_g_g_i_n_g _T_o_o_l_s

_D_e_s_c_r_i_p_t_i_o_n:

     The function `sessionData' provides a work-around in R for the
     absence of a session database (what you get in S with the argument
     `where=0' to functions such as `get' and `assign').

     The functions `traceOn', `traceOff' and `browseAll' are debugging
     tools with roughly similar functionality to `trace', `untrace' and
     `browser' as described in the reference.  Calling `traceOn'
     creates a new version of a function with arbitrary code inserted
     at the beginning of the call and/or on exit. Calling `traceOff'
     undoes the change.  The function `browseAll' is a useful
     interactive call to insert for tracing.  It behaves basically like
     `debugger'.

     Note:  use `traceOn' only for testing functions in a library, not
     for functions defined in the global environment.  Because the
     session data is in position 2 on the search list, the temporary
     versions stored there will not override functions in the global
     environment.

     A more satisfactory version of these  facilities is likely to be
     provided in the future.  Use the current versions but don't write
     code that depends on them.

_U_s_a_g_e:

     sessionData()

     traceOn(what, tracer=browseAll, exit=NULL)

     traceOff(what)

     browseAll()

_A_r_g_u_m_e_n_t_s:

    what: The object to be traced or untraced. 

tracer, exit: The code to use at the entrance or exit trace.  Either a
          function (which will be called with no arguments) or an
          expression (typically constructed from `link{quote}' or
          `substitute') to be evaluated. 

_D_e_t_a_i_l_s:

     `sessionData':  return the index of the session data in the search
     list, attaching it if it is not attached

     `traceOn':  initialize tracing on calls to function `what'.  The
     function or expression `tracer' is called on entry, and the
     function or expression `exit' on exit.

     `traceOff':  turn off tracing of this function

     `browseAll':  browse the current stack of function calls.

     Uses the function `debugger' to set up browser calls on the
     frames.  On exit from that function, computation continues after
     the call to browseAll.  Computations done in the frames will have
     no effect.

_A_u_t_h_o_r(_s):

     John Chambers

_R_e_f_e_r_e_n_c_e_s:

     See   Programming with Data (John M. Chambers, Springer, 1998) for
     the equivalent functions.

