Skip to content

Commit

Permalink
Remove confusing globalenv() example (#243)
Browse files Browse the repository at this point in the history
Fixes #230
  • Loading branch information
hadley authored Jan 10, 2024
1 parent a66f44c commit ab158d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions R/defer.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,10 @@ defer_ns <- environment(defer)
#' print(attributes(environment()))
#' })
#'
#' # defer and trigger events on the global environment
#' # note that examples lack function scoping so deferred calls will
#' # will be executed immediately
#' defer(print("one"))
#' defer(print("two"))
#' deferred_run()
#'
#' defer(print("three"))
#' deferred_clear()
#' deferred_run()
defer <- function(expr, envir = parent.frame(), priority = c("first", "last")) NULL

#' @rdname defer
Expand Down
8 changes: 2 additions & 6 deletions man/defer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ab158d7

Please sign in to comment.