Rev 15357 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{Session}\alias{sessionData}\alias{traceOn}\alias{traceOff}\alias{browseAll}\title{Session Data and Debugging Tools}\usage{sessionData()traceOn(what, tracer=browseAll, exit=NULL)traceOff(what)browseAll()}\description{The function \code{sessionData} provides a work-around in R for the absence of asession database (what you get in S with the argument \code{where=0}to functions such as \code{get} and \code{assign}).The functions \code{traceOn}, \code{traceOff} and \code{browseAll} aredebugging tools with roughly similar functionality to \code{trace}, \code{untrace} and\code{browser} as described in the reference. Calling\code{traceOn} creates a new version of a function with arbitrarycode inserted at the beginning of the call and/or on exit.Calling \code{traceOff} undoes the change. The function\code{browseAll} is a useful interactive call to insert fortracing. It behaves basically like \code{\link{debugger}}.Note: use \code{traceOn} only for testing functions in a library,\emph{not} for functions defined in the global environment. Becausethe session data is in position 2 on the search list, the temporaryversions stored there will not override functions in the global environment.A moresatisfactory version of these facilities is likely to be providedin the future. Use the current versions but don't write code thatdepends on them.}\details{\code{sessionData}:return the index of the session data in the search list,attaching it if it is not attached\code{traceOn}:initialize tracing on calls to function \code{what}. The function or expression\code{tracer} is called on entry, and the function or expression \code{exit} on exit.\code{traceOff}:turn off tracing of this function\code{browseAll}:browse the current stack of function calls.Uses the function \code{debugger} to set up browser callson the frames. On exit from that function, computationcontinues after the call to browseAll. Computations donein the frames will have no effect.}\references{See \emph{Programming with Data} (John M. Chambers, Springer, 1998) for the equivalentfunctions.}\author{John Chambers}\keyword{programming}\keyword{classes}\keyword{methods}