@@ -9361,6 +9361,7 @@ suite.
93619361> glm(resp ~ 0+predictor, family = binomial(link="log"))
93629362Error: no valid set of coefficients has been found: please supply starting values
93639363> traceback()
9364+ @c FIXME: the call stack here and below is actually much longer since r50688
936493653: stop("no valid set of coefficients has been found: please supply
93659366 starting values", call. = FALSE)
936693672: glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart,
@@ -9434,7 +9435,8 @@ which does not help much, as there is no call to @code{as.environment}
94349435in @code{initialize} (and the note ``called from internal dispatch''
94359436tells us so). In this case we searched the @R{} sources for the quoted
94369437call, which occurred in only one place,
9437- @code{methods:::.asEnvironmentPackage}. So now we knew where the
9438+ @c @code{methods:::.asEnvironmentPackage} @c long removed (c76155)
9439+ so now we knew where the
94389440error was occurring. (This was an unusually opaque example.)
94399441
94409442The error message
@@ -9455,13 +9457,13 @@ options(expressions=500)
94559457@noindent
94569458and re-run the example showing the error.
94579459
9458- Sometimes there is warning that clearly is the precursor to some later
9460+ Sometimes there is a warning that clearly is the precursor to some later
94599461error, but it is not obvious where it is coming from. Setting
94609462@command{options(warn = 2)} (which turns warnings into errors) can help here.
94619463
94629464Once we have located the error, we have some choices. One way to proceed
94639465is to find out more about what was happening at the time of the crash by
9464- looking a @emph{@I{post-mortem}} dump. To do so, set
9466+ looking at a @emph{@I{post-mortem}} dump. To do so, set
94659467@findex dump.frames
94669468@command{options(error=dump.frames)} and run the code again. Then invoke
94679469@command{debugger()} and explore the dump. Continuing our example:
@@ -9486,7 +9488,8 @@ Available environments had calls:
948694881: glm(resp ~ 0 + predictor, family = binomial(link = "log"))
948794892: glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, mus
948894903: stop("no valid set of coefficients has been found: please supply starting values
9489- Enter an environment number, or 0 to exit Selection:
9491+ Enter an environment number, or 0 to exit
9492+ Selection:
94909493@end smallexample
94919494
94929495@noindent
@@ -9499,7 +9502,7 @@ error message, and explore some of the variables (and execute two
94999502function calls).
95009503
95019504@smallexample
9502- Enter an environment number, or 0 to exit Selection: 2
9505+ Selection: 2
95039506Browsing in the environment with call:
95049507 glm.fit(x = X, y = Y, weights = weights, start = start, etas
95059508Called from: debugger.look(ind)
@@ -9532,7 +9535,8 @@ Available environments had calls:
953295352: glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart
953395363: stop("no valid set of coefficients has been found: please supply starting v
95349537
9535- Enter an environment number, or 0 to exit Selection: 0
9538+ Enter an environment number, or 0 to exit
9539+ Selection: 0
95369540> rm(last.dump)
95379541@end smallexample
95389542
@@ -9570,7 +9574,7 @@ Selection:
95709574which is very similar to @code{dump.frames}. However, we can examine
95719575the state of the program directly, without dumping and re-loading the
95729576dump. As its help page says, @code{recover} can be routinely used as
9573- the error action in place of @code{dump.calls} and @code{dump. frames},
9577+ the error action in place of @code{dump.frames},
95749578since it behaves like @code{dump.frames} in non-interactive use.
95759579
95769580
@@ -9591,7 +9595,7 @@ debugging in: glm.fit(x = X, y = Y, weights = weights, start = start, etastart =
95919595debug: @{
95929596## lists the whole function
95939597Browse[1]>
9594- debug: x <- as.matrix(x )
9598+ debug: control <- do.call("glm.control", control )
95959599...
95969600Browse[1]> start
95979601[1] -2.235357e-06
@@ -9619,7 +9623,7 @@ being debugged or contains a call to @code{browser()}.)
96199623e.g.@: @code{debug(stats:::predict.Arima)}. (It cannot be used for S4
96209624methods, but an alternative is given on the help page for @code{debug}.)
96219625Sometimes you want to debug a function defined inside another function,
9622- e.g.@: the function @code{arimafn } defined inside @code{arima}. To do so,
9626+ e.g.@: the function @code{armafn } defined inside @code{arima}. To do so,
96239627set @code{debug} on the outer function (here @code{arima}) and
96249628step through it until the inner function has been defined. Then
96259629call @code{debug} on the inner function (and use @code{c} to get out of
0 commit comments