The eval_ and call_ families of functions provide a replacement for the base R functions prefixed with sys. (which are all about the context stack), as well as for parent.frame() (which is the only base R function for querying the call stack). The context stack includes all R-level evaluation contexts. It is linear in terms of execution history but due to lazy evaluation it is potentially nonlinear in terms of call history. The call stack history, on the other hand, is homogenous.

global_frame()

current_frame()

ctxt_frame(n = 1)

call_frame(n = 1, clean = TRUE)

ctxt_depth()

call_depth()

ctxt_stack(n = NULL, trim = 0)

call_stack(n = NULL, clean = TRUE)

Arguments

n

The number of frames to go back in the stack.

clean

Whether to post-process the call stack to clean non-standard frames. If TRUE, suboptimal call-stack entries by base::eval() will be cleaned up: the duplicate frame created by eval() is eliminated.

trim

The number of layers of intervening frames to trim off the stack. See stack_trim() and examples.

Details

ctxt_frame() and call_frame() return a frame object containing the following fields: expr and env (call expression and evaluation environment), pos and caller_pos (position of current frame in the context stack and position of the caller), and fun (function of the current frame). ctxt_stack() and call_stack() return a list of all context or call frames on the stack. Finally, ctxt_depth() and call_depth() report the current context position or the number of calling frames on the stack.

The base R functions take two sorts of arguments to indicate which frame to query: which and n. The n argument is straightforward: it's the number of frames to go down the stack, with n = 1 referring to the current context. The which argument is more complicated and changes meaning for values lower than 1. For the sake of consistency, the rlang functions all take the same kind of argument n. This argument has a single meaning (the number of frames to go down the stack) and cannot be lower than 1.

Note finally that parent.frame(1) corresponds to call_frame(2)$env, as n = 1 always refers to the current frame. This makes the _frame() and _stack() functions consistent: ctxt_frame(2) is the same as ctxt_stack()[[2]]. Also, ctxt_depth() returns one more frame than [base::sys.nframe()] because it counts the global frame. That is consistent with the _stack() functions which return the global frame as well. This way, call_stack(call_depth()) is the same as global_frame().

[[2]: R:[2 [base::sys.nframe()]: R:base::sys.nframe()

Life cycle

These functions are in the questioning stage. We are no longer convinced they belong in rlang as they are mostly for REPL interaction and runtime inspection rather than function development.

Examples

# Expressions within arguments count as contexts identity(identity(ctxt_depth())) # returns 2
#> [1] 25
# But they are not part of the call stack because arguments are # evaluated within the calling function (or the global environment # if called at top level) identity(identity(call_depth())) # returns 0
#> [1] 12
# The context stacks includes all intervening execution frames. The # call stack doesn't: f <- function(x) identity(x) f(f(ctxt_stack()))
#> [[1]] #> <frame 26> (25) #> expr: identity(x) #> env: [local 0x7f829249cbb8] #> #> [[2]] #> <frame 25> (22) #> expr: f(ctxt_stack()) #> env: [local 0x7f829249caa0] #> #> [[3]] #> <frame 24> (23) #> expr: identity(x) #> env: [local 0x7f829249c950] #> #> [[4]] #> <frame 23> (22) #> expr: f(f(ctxt_stack())) #> env: [local 0x7f829249c800] #> #> [[5]] #> <frame 22> (21) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[6]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829249c640] #> #> [[7]] #> <frame 20> (11) #> expr: withVisible(eval(expr, envir, enclos)) #> env: [local 0x7f82924a4ad8] #> #> [[8]] #> <frame 19> (11) #> expr: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, <...> #> env: [local 0x7f82924b9228] #> #> [[9]] #> <frame 18> (17) #> expr: doTryCatch(return(expr), name, parentenv, handler) #> env: [local 0x7f82924b9b78] #> #> [[10]] #> <frame 17> (16) #> expr: tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> env: [local 0x7f82924b9788] #> #> [[11]] #> <frame 16> (15) #> expr: tryCatchList(expr, classes, parentenv, handlers) #> env: [local 0x7f82924bfb78] #> #> [[12]] #> <frame 15> (14) #> expr: tryCatch(expr, error = function(e) { <...> #> env: [local 0x7f82924bf478] #> #> [[13]] #> <frame 14> (13) #> expr: try(f, silent = TRUE) #> env: [local 0x7f82924c01b8] #> #> [[14]] #> <frame 13> (11) #> expr: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, <...> #> env: [local 0x7f82924bfff8] #> #> [[15]] #> <frame 12> (11) #> expr: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, <...> #> env: [local 0x7f82924bff18] #> #> [[16]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f829259cd88] #> #> [[17]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[18]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[19]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[20]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[21]] #> <frame 6> (5) #> expr: as_data(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d20f88] #> #> [[22]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[23]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[24]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[25]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[26]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[27]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "ctxt_stack" "stack"
f(f(call_stack()))
#> [[1]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[2]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f8294b04440] #> #> [[3]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[4]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[5]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[6]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[7]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[8]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[9]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[10]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[11]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[12]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "call_stack" "stack"
g <- function(cmd) cmd() f(g(ctxt_stack))
#> [[1]] #> <frame 25> (22) #> expr: g(ctxt_stack) #> env: [local 0x7f829353b608] #> #> [[2]] #> <frame 24> (23) #> expr: identity(x) #> env: [local 0x7f829353c2a0] #> #> [[3]] #> <frame 23> (22) #> expr: f(g(ctxt_stack)) #> env: [local 0x7f829353c150] #> #> [[4]] #> <frame 22> (21) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[5]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829353bf90] #> #> [[6]] #> <frame 20> (11) #> expr: withVisible(eval(expr, envir, enclos)) #> env: [local 0x7f829353cad8] #> #> [[7]] #> <frame 19> (11) #> expr: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, <...> #> env: [local 0x7f829353d2d8] #> #> [[8]] #> <frame 18> (17) #> expr: doTryCatch(return(expr), name, parentenv, handler) #> env: [local 0x7f829353df20] #> #> [[9]] #> <frame 17> (16) #> expr: tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> env: [local 0x7f829353e9f8] #> #> [[10]] #> <frame 16> (15) #> expr: tryCatchList(expr, classes, parentenv, handlers) #> env: [local 0x7f829353fbb8] #> #> [[11]] #> <frame 15> (14) #> expr: tryCatch(expr, error = function(e) { <...> #> env: [local 0x7f82935401c0] #> #> [[12]] #> <frame 14> (13) #> expr: try(f, silent = TRUE) #> env: [local 0x7f829353ff20] #> #> [[13]] #> <frame 13> (11) #> expr: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, <...> #> env: [local 0x7f8293540d08] #> #> [[14]] #> <frame 12> (11) #> expr: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, <...> #> env: [local 0x7f8293540988] #> #> [[15]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f829357bcd0] #> #> [[16]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[17]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[18]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[19]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[20]] #> <frame 6> (5) #> expr: as_data(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d20f88] #> #> [[21]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[22]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[23]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[24]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[25]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[26]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "ctxt_stack" "stack"
f(g(call_stack))
#> [[1]] #> <frame 25> (21) #> expr: g(call_stack) #> env: [local 0x7f829168e668] #> #> [[2]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[3]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f82916c4a40] #> #> [[4]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[5]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[6]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[7]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[8]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[9]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[10]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[11]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[12]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[13]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "call_stack" "stack"
# The rlang _stack() functions return a list of frame # objects. Use purrr::transpose() or index a field with # purrr::map()'s to extract a particular field from a stack: # stack <- f(f(call_stack())) # purrr::map(stack, "env") # purrr::transpose(stack)$expr # current_frame() is an alias for ctxt_frame(1) fn <- function() list(current = current_frame(), first = ctxt_frame(1)) fn()
#> $current #> <frame 23> (22) #> expr: fn() #> env: [local 0x7f8291225678] #> #> $first #> <frame 23> (22) #> expr: fn() #> env: [local 0x7f8291225678] #>
# While current_frame() is the top of the stack, global_frame() is # the bottom: fn <- function() { n <- ctxt_depth() ctxt_frame(n) } identical(fn(), global_frame())
#> [1] TRUE
# ctxt_stack() returns a stack with all intervening frames. You can # trim layers of intervening frames with the trim argument: identity(identity(ctxt_stack()))
#> [[1]] #> <frame 24> (22) #> expr: identity(ctxt_stack()) #> env: [local 0x7f828e51fa70] #> #> [[2]] #> <frame 23> (22) #> expr: identity(identity(ctxt_stack())) #> env: [local 0x7f828e51f958] #> #> [[3]] #> <frame 22> (21) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[4]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f828e520158] #> #> [[5]] #> <frame 20> (11) #> expr: withVisible(eval(expr, envir, enclos)) #> env: [local 0x7f828e520df0] #> #> [[6]] #> <frame 19> (11) #> expr: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, <...> #> env: [local 0x7f828e544f48] #> #> [[7]] #> <frame 18> (17) #> expr: doTryCatch(return(expr), name, parentenv, handler) #> env: [local 0x7f828d672990] #> #> [[8]] #> <frame 17> (16) #> expr: tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> env: [local 0x7f828d677d40] #> #> [[9]] #> <frame 16> (15) #> expr: tryCatchList(expr, classes, parentenv, handlers) #> env: [local 0x7f828d68c498] #> #> [[10]] #> <frame 15> (14) #> expr: tryCatch(expr, error = function(e) { <...> #> env: [local 0x7f828d694c28] #> #> [[11]] #> <frame 14> (13) #> expr: try(f, silent = TRUE) #> env: [local 0x7f828d699a30] #> #> [[12]] #> <frame 13> (11) #> expr: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, <...> #> env: [local 0x7f828d69e800] #> #> [[13]] #> <frame 12> (11) #> expr: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, <...> #> env: [local 0x7f828d69eee8] #> #> [[14]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f828e64cc60] #> #> [[15]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[16]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[17]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[18]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[19]] #> <frame 6> (5) #> expr: as_data(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d20f88] #> #> [[20]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[21]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[22]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[23]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[24]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[25]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "ctxt_stack" "stack"
identity(identity(ctxt_stack(trim = 1)))
#> [[1]] #> <frame 22> (21) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[2]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f8296346f88] #> #> [[3]] #> <frame 20> (11) #> expr: withVisible(eval(expr, envir, enclos)) #> env: [local 0x7f82963471f0] #> #> [[4]] #> <frame 19> (11) #> expr: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, <...> #> env: [local 0x7f82960db430] #> #> [[5]] #> <frame 18> (17) #> expr: doTryCatch(return(expr), name, parentenv, handler) #> env: [local 0x7f82960da238] #> #> [[6]] #> <frame 17> (16) #> expr: tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> env: [local 0x7f82960da580] #> #> [[7]] #> <frame 16> (15) #> expr: tryCatchList(expr, classes, parentenv, handlers) #> env: [local 0x7f82960d8920] #> #> [[8]] #> <frame 15> (14) #> expr: tryCatch(expr, error = function(e) { <...> #> env: [local 0x7f82960e9040] #> #> [[9]] #> <frame 14> (13) #> expr: try(f, silent = TRUE) #> env: [local 0x7f82960e9270] #> #> [[10]] #> <frame 13> (11) #> expr: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, <...> #> env: [local 0x7f82960e93f8] #> #> [[11]] #> <frame 12> (11) #> expr: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, <...> #> env: [local 0x7f82960e94d8] #> #> [[12]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f827b233988] #> #> [[13]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[14]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[15]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[16]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[17]] #> <frame 6> (5) #> expr: as_data(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d20f88] #> #> [[18]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[19]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[20]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[21]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[22]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[23]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "ctxt_stack" "stack"
# ctxt_stack() is called within fn() with intervening frames: fn <- function(trim) identity(identity(ctxt_stack(trim = trim))) fn(0)
#> [[1]] #> <frame 25> (23) #> expr: identity(ctxt_stack(trim = trim)) #> env: [local 0x7f827c741e70] #> #> [[2]] #> <frame 24> (23) #> expr: identity(identity(ctxt_stack(trim = trim))) #> env: [local 0x7f827c741f88] #> #> [[3]] #> <frame 23> (22) #> expr: fn(0) #> env: [local 0x7f827c7420a0] #> #> [[4]] #> <frame 22> (21) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[5]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f827c742260] #> #> [[6]] #> <frame 20> (11) #> expr: withVisible(eval(expr, envir, enclos)) #> env: [local 0x7f827c741520] #> #> [[7]] #> <frame 19> (11) #> expr: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, <...> #> env: [local 0x7f827c741b08] #> #> [[8]] #> <frame 18> (17) #> expr: doTryCatch(return(expr), name, parentenv, handler) #> env: [local 0x7f827c741110] #> #> [[9]] #> <frame 17> (16) #> expr: tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> env: [local 0x7f827c7404b0] #> #> [[10]] #> <frame 16> (15) #> expr: tryCatchList(expr, classes, parentenv, handlers) #> env: [local 0x7f827c7407f8] #> #> [[11]] #> <frame 15> (14) #> expr: tryCatch(expr, error = function(e) { <...> #> env: [local 0x7f827c73ff18] #> #> [[12]] #> <frame 14> (13) #> expr: try(f, silent = TRUE) #> env: [local 0x7f827c740148] #> #> [[13]] #> <frame 13> (11) #> expr: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, <...> #> env: [local 0x7f827c7402d0] #> #> [[14]] #> <frame 12> (11) #> expr: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, <...> #> env: [local 0x7f827c73f408] #> #> [[15]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f827c43e8d8] #> #> [[16]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[17]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[18]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[19]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[20]] #> <frame 6> (5) #> expr: as_data(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d20f88] #> #> [[21]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[22]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[23]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[24]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[25]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[26]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "ctxt_stack" "stack"
# We can trim the first layer of those: fn(1)
#> [[1]] #> <frame 23> (22) #> expr: fn(1) #> env: [local 0x7f827c268028] #> #> [[2]] #> <frame 22> (21) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[3]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f827c267240] #> #> [[4]] #> <frame 20> (11) #> expr: withVisible(eval(expr, envir, enclos)) #> env: [local 0x7f827c2674a8] #> #> [[5]] #> <frame 19> (11) #> expr: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, <...> #> env: [local 0x7f827c266ae8] #> #> [[6]] #> <frame 18> (17) #> expr: doTryCatch(return(expr), name, parentenv, handler) #> env: [local 0x7f827c267098] #> #> [[7]] #> <frame 17> (16) #> expr: tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> env: [local 0x7f827c266438] #> #> [[8]] #> <frame 16> (15) #> expr: tryCatchList(expr, classes, parentenv, handlers) #> env: [local 0x7f827c266780] #> #> [[9]] #> <frame 15> (14) #> expr: tryCatch(expr, error = function(e) { <...> #> env: [local 0x7f827c265ea0] #> #> [[10]] #> <frame 14> (13) #> expr: try(f, silent = TRUE) #> env: [local 0x7f827c2660d0] #> #> [[11]] #> <frame 13> (11) #> expr: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, <...> #> env: [local 0x7f827c2652b0] #> #> [[12]] #> <frame 12> (11) #> expr: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, <...> #> env: [local 0x7f827c265390] #> #> [[13]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f827c23c140] #> #> [[14]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[15]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[16]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[17]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[18]] #> <frame 6> (5) #> expr: as_data(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d20f88] #> #> [[19]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[20]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[21]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[22]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[23]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[24]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "ctxt_stack" "stack"
# The outside intervening frames (at the fn() call site) are still # returned, but can be trimmed as well: identity(identity(fn(1)))
#> [[1]] #> <frame 25> (22) #> expr: fn(1) #> env: [local 0x7f827c5e4748] #> #> [[2]] #> <frame 24> (22) #> expr: identity(fn(1)) #> env: [local 0x7f827c5e4860] #> #> [[3]] #> <frame 23> (22) #> expr: identity(identity(fn(1))) #> env: [local 0x7f827c5e4978] #> #> [[4]] #> <frame 22> (21) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[5]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f827c5e3b90] #> #> [[6]] #> <frame 20> (11) #> expr: withVisible(eval(expr, envir, enclos)) #> env: [local 0x7f827c5e3df8] #> #> [[7]] #> <frame 19> (11) #> expr: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, <...> #> env: [local 0x7f827c5e3438] #> #> [[8]] #> <frame 18> (17) #> expr: doTryCatch(return(expr), name, parentenv, handler) #> env: [local 0x7f827c5e2a40] #> #> [[9]] #> <frame 17> (16) #> expr: tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> env: [local 0x7f827c5e2d88] #> #> [[10]] #> <frame 16> (15) #> expr: tryCatchList(expr, classes, parentenv, handlers) #> env: [local 0x7f827c5e30d0] #> #> [[11]] #> <frame 15> (14) #> expr: tryCatch(expr, error = function(e) { <...> #> env: [local 0x7f827c5e27f0] #> #> [[12]] #> <frame 14> (13) #> expr: try(f, silent = TRUE) #> env: [local 0x7f827c5e1a78] #> #> [[13]] #> <frame 13> (11) #> expr: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, <...> #> env: [local 0x7f827c5e1c00] #> #> [[14]] #> <frame 12> (11) #> expr: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, <...> #> env: [local 0x7f827c5e1ce0] #> #> [[15]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f827c5c6ea0] #> #> [[16]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[17]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[18]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[19]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[20]] #> <frame 6> (5) #> expr: as_data(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d20f88] #> #> [[21]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[22]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[23]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[24]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[25]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[26]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "ctxt_stack" "stack"
identity(identity(fn(2)))
#> [[1]] #> <frame 22> (21) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[2]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f8299495640] #> #> [[3]] #> <frame 20> (11) #> expr: withVisible(eval(expr, envir, enclos)) #> env: [local 0x7f82994958a8] #> #> [[4]] #> <frame 19> (11) #> expr: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, <...> #> env: [local 0x7f8299494ee8] #> #> [[5]] #> <frame 18> (17) #> expr: doTryCatch(return(expr), name, parentenv, handler) #> env: [local 0x7f8299495498] #> #> [[6]] #> <frame 17> (16) #> expr: tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> env: [local 0x7f8299494838] #> #> [[7]] #> <frame 16> (15) #> expr: tryCatchList(expr, classes, parentenv, handlers) #> env: [local 0x7f8299494b80] #> #> [[8]] #> <frame 15> (14) #> expr: tryCatch(expr, error = function(e) { <...> #> env: [local 0x7f829948f6a0] #> #> [[9]] #> <frame 14> (13) #> expr: try(f, silent = TRUE) #> env: [local 0x7f829948f8d0] #> #> [[10]] #> <frame 13> (11) #> expr: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, <...> #> env: [local 0x7f829948eab0] #> #> [[11]] #> <frame 12> (11) #> expr: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, <...> #> env: [local 0x7f829948eb90] #> #> [[12]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f82994fcb10] #> #> [[13]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[14]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[15]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[16]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[17]] #> <frame 6> (5) #> expr: as_data(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d20f88] #> #> [[18]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[19]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[20]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[21]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[22]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[23]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "ctxt_stack" "stack"
g <- function(trim) identity(identity(fn(trim))) g(2)
#> [[1]] #> <frame 23> (22) #> expr: g(2) #> env: [local 0x7f82991bb350] #> #> [[2]] #> <frame 22> (21) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[3]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f82991bb628] #> #> [[4]] #> <frame 20> (11) #> expr: withVisible(eval(expr, envir, enclos)) #> env: [local 0x7f82991ba8e8] #> #> [[5]] #> <frame 19> (11) #> expr: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, <...> #> env: [local 0x7f82991baed0] #> #> [[6]] #> <frame 18> (17) #> expr: doTryCatch(return(expr), name, parentenv, handler) #> env: [local 0x7f82991ba4d8] #> #> [[7]] #> <frame 17> (16) #> expr: tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> env: [local 0x7f82991b9878] #> #> [[8]] #> <frame 16> (15) #> expr: tryCatchList(expr, classes, parentenv, handlers) #> env: [local 0x7f82991b9bf8] #> #> [[9]] #> <frame 15> (14) #> expr: tryCatch(expr, error = function(e) { <...> #> env: [local 0x7f82991b9318] #> #> [[10]] #> <frame 14> (13) #> expr: try(f, silent = TRUE) #> env: [local 0x7f82991b9548] #> #> [[11]] #> <frame 13> (11) #> expr: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, <...> #> env: [local 0x7f82991b96d0] #> #> [[12]] #> <frame 12> (11) #> expr: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, <...> #> env: [local 0x7f82991b8808] #> #> [[13]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f82994e6508] #> #> [[14]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[15]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[16]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[17]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[18]] #> <frame 6> (5) #> expr: as_data(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d20f88] #> #> [[19]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[20]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[21]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[22]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[23]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[24]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "ctxt_stack" "stack"
g(3)
#> [[1]] #> <frame 22> (21) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829585f8a8] #> #> [[2]] #> <frame 21> (11) #> expr: eval(expr, envir, enclos) #> env: [local 0x7f829968c2d0] #> #> [[3]] #> <frame 20> (11) #> expr: withVisible(eval(expr, envir, enclos)) #> env: [local 0x7f829947b638] #> #> [[4]] #> <frame 19> (11) #> expr: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, <...> #> env: [local 0x7f827c51c430] #> #> [[5]] #> <frame 18> (17) #> expr: doTryCatch(return(expr), name, parentenv, handler) #> env: [local 0x7f829969c408] #> #> [[6]] #> <frame 17> (16) #> expr: tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> env: [local 0x7f829969be38] #> #> [[7]] #> <frame 16> (15) #> expr: tryCatchList(expr, classes, parentenv, handlers) #> env: [local 0x7f829947b6e0] #> #> [[8]] #> <frame 15> (14) #> expr: tryCatch(expr, error = function(e) { <...> #> env: [local 0x7f828e4220e8] #> #> [[9]] #> <frame 14> (13) #> expr: try(f, silent = TRUE) #> env: [local 0x7f8291263eb0] #> #> [[10]] #> <frame 13> (11) #> expr: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, <...> #> env: [local 0x7f8290c1c390] #> #> [[11]] #> <frame 12> (11) #> expr: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, <...> #> env: [local 0x7f8290ec9178] #> #> [[12]] #> <frame 11> (10) #> expr: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, <...> #> env: [frame 0x7f8299728030] #> #> [[13]] #> <frame 10> (9) #> expr: evaluate::evaluate(code, env, new_device = TRUE) #> env: [frame 0x7f8293b94ae8] #> #> [[14]] #> <frame 9> (8) #> expr: .f(code = .l[[c(1L, 1L)]], run = .l[[c(2L, 1L)]], show = .l[[c(3L, <...> #> env: [frame 0x7f8293b99fb8] #> #> [[15]] #> <frame 8> (7) #> expr: purrr::pmap_chr(list(code = code, run = run, show = show), format_example_chunk, <...> #> env: [frame 0x7f8293ba9438] #> #> [[16]] #> <frame 7> (5) #> expr: as_data.tag_examples(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d1fc08] #> #> [[17]] #> <frame 6> (5) #> expr: as_data(tags$tag_examples[[1]], env = new.env(parent = globalenv()), <...> #> env: [frame 0x7f8293d20f88] #> #> [[18]] #> <frame 5> (4) #> expr: data_reference_topic(topic, pkg, path = path, examples = examples, <...> #> env: [frame 0x7f82913d7108] #> #> [[19]] #> <frame 4> (3) #> expr: .f(.x[[i]], ...) #> env: [frame 0x7f829902b5f0] #> #> [[20]] #> <frame 3> (2) #> expr: purrr::map(topics, build_reference_topic, path, pkg = pkg, lazy = lazy, <...> #> env: [frame 0x7f829512a5c0] #> #> [[21]] #> <frame 2> (1) #> expr: build_reference(pkg, lazy = FALSE, examples = examples, run_dont_run = run_dont_run, <...> #> env: [frame 0x7f8293d05f50] #> #> [[22]] #> <frame 1> (0) #> expr: pkgdown::build_site() #> env: [frame 0x7f8293da3268] #> #> [[23]] #> <frame 0> [global] #> expr: NULL #> env: [global] #> #> attr(,"class") #> [1] "ctxt_stack" "stack"