dot-pipe_between: Quote a chain of (abritrary number of) pipes.

Description Usage Arguments Value Examples

Description

Quote a chain of (abritrary number of) pipes.

Usage

1

Arguments

x

Starting function for the pipe chain.

...

Subsequent functions appended to the pipe chain.

Value

A quoted pipe chain starting with x to the last element of ..., or x itself if ... is empty.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# Creating pipe chain
.pipe_between(2, runif())
#> 2 %>% runif()

# Evaluating pipe chain later on
eval(.pipe_between(2, runif()))
#> [1] 0.5180003 0.5353272

# Longer pipe chain
long_chain <- .pipe_between(2, runif(), sum(), log())
long_chain
#> 2 %>% runif() %>% sum() %>% log()

eval(long_chain)
#> [1] -0.4767814

## End(Not run)

program--/modeltargets documentation built on Dec. 22, 2021, 9:54 a.m.