is_valid: Checks if the current state is valid (stored in the cache)

Description Usage Arguments Value Examples

View source: R/flow-functions.R

Description

Checks if the current state is valid (stored in the cache)

Usage

1
is_valid(flow, state = "current")

Arguments

flow

A flow object, e.g. as returned by flow_fn.

state

A flow state. It can be either a valid state index (integer) or a valid state: "current", "all", in_hash or out_hash (string).

Value

A logical value, whether the value can be obtained without triggering computation.

Examples

1
2
3
fn <- function(x, y) { x + y + 9 }
flowed_fn <- flow_fn(2, 3, fn = fn) 
is_valid_flow <- is_valid(flowed_fn)

numeract/rflow documentation built on May 28, 2019, 3:39 p.m.