Learn R Programming

wrapr (version 1.9.6)

as_dot_fn: Convert an unevaluted pipeline into a function.

Description

Convert an unevaluted pipeline into a function of "."

Usage

as_dot_fn(pipeline, env = parent.frame())

Arguments

pipeline

a un-evaluated wrapr pipeline.

env

envirnonment to work in.

Value

single function with signature (., env = parent.frame())

Details

Note: writes "." into env.

Examples

Run this code
# NOT RUN {
f <- as_dot_fn(sin(.) %.>% cos(.))
f(1:3)

g <- as_dot_fn(. %.>% sin(.) %.>% cos(.))
g(1:3)

# }

Run the code above in your browser using DataLab