defer()'s global env facilities work

  defer(print("howdy"), envir = globalenv())
Message <simpleMessage>
  Setting global deferred event(s).
  i These will be run:
    * Automatically, when the R session ends.
    * On demand, if you call `withr::deferred_run()`.
  i Use `withr::deferred_clear()` to clear them without executing.

Try the withr package in your browser

Any scripts or data that you put into this service are public.

withr documentation built on March 18, 2022, 7:47 p.m.