Schedule an R function or formula to run after a specified period of time.
Similar to JavaScript's setTimeout function. Like JavaScript, R is
single-threaded so there's no guarantee that the operation will run exactly
at the requested time, only that at least that much time will elapse.
Number of seconds in the future to delay execution. There is no
guarantee that the function will be executed at the desired time, but it
should not execute earlier.
Details
The mechanism used by this package is inspired by Simon Urbanek's
background package and similar code in
Rhttpd.
# NOT RUN {# Example of formula stylelater(~cat("Hello from the past\n"), 3)
# Example of function stylelater(function() {
print(summary(cars))
}, 2)
# }