Software
Placeholder

later

Schedule an R function or formula to run after a specified period of time

C++

The later package enables scheduling of R functions to execute after a specified delay, similar to JavaScript’s setTimeout function. Since R is single-threaded, scheduled operations run when control returns to the top-level prompt to avoid reentrancy issues.

The package provides both R and C++ interfaces for deferred execution, supports file descriptor monitoring for asynchronous I/O operations like reading from TCP sockets, and includes a BackgroundTask C++ class for safely executing computationally expensive work on background threads. This makes it useful for building responsive applications that need to handle time-delayed callbacks or non-blocking I/O without freezing the R session.

Contributors