Skip to content

Commit

Permalink
update peek()
Browse files Browse the repository at this point in the history
  • Loading branch information
romainfrancois committed Feb 3, 2024
1 parent d33a361 commit a9afadf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions R/peek.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ informant <- function() {
#' peek()
#'
#' @export
peek <- function(fun) {
fun <- substitute(fun)
trace(fun, tracer = snitch::informant)
peek <- function(fun, tracer = snitch::informant, where = topenv(parent.frame())) {
call <- sys.call()
call[[1L]] <- quote(trace)
call$where <- where
call$tracer <- tracer
eval.parent(call)
}

0 comments on commit a9afadf

Please sign in to comment.