The R Project SVN R

Rev

Rev 27447 | Rev 30843 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27447 Rev 27716
Line 161... Line 161...
161
  tracing functions;
161
  tracing functions;
162
  also, \code{\link{quote}} and \code{\link{substitute}} for
162
  also, \code{\link{quote}} and \code{\link{substitute}} for
163
  constructing general expressions.
163
  constructing general expressions.
164
}
164
}
165
\examples{
165
\examples{
166
\dontshow{ hasMethods <- .isMethodsDispatchOn()}
166
if(.isMethodsDispatchOn()) { # trace needs method package attached.
167
 
167
 
168
f <- function(x, y) {
168
f <- function(x, y) {
169
    y <- pmax(y, .001)
169
    y <- pmax(y, .001)
170
    x ^ y
170
    x ^ y
171
}
171
}
Line 187... Line 187...
187
trace("as.matrix", recover)
187
trace("as.matrix", recover)
188
 
188
 
189
## turn off the tracing
189
## turn off the tracing
190
 
190
 
191
untrace(c("f", "as.matrix"))
191
untrace(c("f", "as.matrix"))
192
 
192
}
193
if(!hasMethods) detach("package:methods")
-
 
194
}
193
}
195
\keyword{programming}
194
\keyword{programming}
196
\keyword{debugging}
195
\keyword{debugging}