Convenience function that creates a new eddy or re-uses it if present.

use_eddy(eddy_name, cache = default_cache(),
  flow_options = default_flow_options(), reuse_if_present = TRUE,
  set_current = TRUE, eddy_env = default_eddy_env())

Arguments

eddy_name

Unique name for the eddy to allow retrieving later.

cache

A cache object returned by one of the cache functions.

flow_options

Options to store for future flow invocations. They do not affect the eddy, they are only stored for ease of access.

reuse_if_present

Logical, whether or not to reuse an eddy with the same name, if already present, even if the flow_options are different.

set_current

Logical, whether to make this eddy current.

eddy_env

The environment in which the eddy is put (bound).

Value

An eddy object to be used for storing flows.

See also

Examples

use_eddy("use_eddy")
#> <R6Eddy> with cache <R6CacheMemory> and 0 flow(s) #> excluded_arg=; eval_arg_fn=NULL; split_bare_list=TRUE; split_dataframe=FALSE; split_fn=NULL #> # A tibble: 0 x 7 #> # ... with 7 variables: fn_name <chr>, fn_id <chr>, fn_key <chr>, class <chr>, #> # CV <chr>, state <chr>, in_mem <int>