The default display is of the stack of the last uncaught error as
  stored as a list of deparsed calls in .Traceback, which
  traceback prints in a user-friendly format.  The stack of
  deparsed calls always contains all function calls and all foreign
  function calls (such as .Call): if profiling is in
  progress it will include calls to some primitive functions.  (Calls
  to builtins are included, but not to specials.)
Errors which are caught via try or
  tryCatch do not generate a traceback, so what is printed
  is the call sequence for the last uncaught error, and not necessarily
  for the last error.
If x is numeric, then the current stack is printed, skipping
  x entries at the top of the stack.  For example,
  options(error = function() traceback(3)) will print the stack
  at the time of the error, skipping the call to traceback() and
  .traceback() 
  and the error function that called it.
Otherwise, x is assumed to be a list or pairlist of deparsed
  calls and will be displayed in the same way.