freeze: Compute the cross-reference of N lists

Description Usage Arguments Value Examples

View source: R/freeze.r

Description

Compute the cross-reference of N lists

Usage

1
freeze(..., out = c(1))

Arguments

...

a list of lists. These will be interpolated using each other's references. (see examples)

out

integer vector. A list of indices from ... whose computed static lists should be returned. The default value is 1.

Value

a list of lists corresponding to the out parameter with values cross-referentially computed. If length(out) == 1, that list will be returned (and not wrapped in a 1-element list).

Examples

1
2
3
one <- list(a = 1, b = list(c = ref(two), d = 2))
two <- list(a = ref(one), b = list(c = 3, d = 4))
process_one <- freeze(one, two)  # process_one$b$c is now 3

robertzk/frost documentation built on May 27, 2019, 10:34 a.m.