Print Call Stack

DESCRIPTION:
Prints the calls in the process of evaluation at the time of an error.

USAGE:
traceback(data=last.dump)

OPTIONAL ARGUMENTS:
data:
list that describes the state of the computation at the time of the error. The "names" attribute of data gives the character form of the calls. This object is created by a call to dump.frames or dump.calls, typically because one of them has been specified as option error.

SIDE EFFECTS:
prints a call stack, i.e., the function calls in the process of being evaluated at a particular time. When traceback is called, it decides which of two possible call stacks it should print: the current call stack or one saved on a previous error. If traceback is called from a top-level expression or is given an explicit data argument, it will print the saved call stack. Otherwise, it prints the currently active call stack.

DETAILS:
Use traceback first when an error occurs that is mystifying. It tells you what function created the error and the calling sequence that lead to that function call. If this is not enough information to discover the cause of the error, then use debugger, browser, or trace.

When using browser, traceback() is often useful to determine how browser was called. This is particularly true when browser was invoked as a result of an interrupt or tracing action.


SEE ALSO:
dump.calls , debugger , browser , trace , options .

EXAMPLES:
  f1 <- function(x) { y <- x+4; f2(y)}
  f2 <- function(x) weird.variable + x
  f1(5)
Error in call to "f2": Object "weird.variable" not found
Dumped
  traceback()
3: f2(y)
2: f1(5)
1: