delayed {delayed}R Documentation

Generates Delayed Version of an Expression

Description

A Delayed version of a function may be called to generate Delayed objects

Usage

delayed(expr, sequential = FALSE, expect_error = FALSE, timeout = NULL)

delayed_fun(fun, sequential = FALSE, expect_error = FALSE)

Arguments

expr

expression to delay

sequential

if TRUE, never parallelize this task

expect_error

if TRUE, pass error to downstream tasks instead of

timeout

specify a time limit for computation halting computation

fun

function to delay

Examples

d <- delayed(3 + 4)
d$compute()
adder <- function(x, y) {
  x + y
}
delayed_adder <- delayed_fun(adder)
z <- delayed_adder(3, 4)
z$compute()

[Package delayed version 0.5.0 Index]