safe_eval: Safe Eval with Timeout
Description
Execute R code with a timeout to prevent infinite loops.
Usage
safe_eval(expr, timeout_seconds = 30, envir = parent.frame())
Value
The result or an error.
Arguments
- expr
Expression to evaluate.
- timeout_seconds
Maximum execution time in seconds.
- envir
Environment for evaluation.