Learn R Programming

wrapr (version 1.9.6)

sequence_as_function: Convert a sequence of expressions into a function.

Description

Convert a sequence of expressions into a function.

Usage

sequence_as_function(dot_seq, env = parent.frame())

Arguments

dot_seq

list of expressions.

env

environment to work in.

Value

function with signature (., eval_environment = parent.frame())

Details

Note: not for steps that intend side-effects or have references to items in non-standard environments.

Examples

Run this code
# NOT RUN {
seq <- Collector() %.>% paste(., "a") %.>% paste(., "b")
f <- sequence_as_function(seq)
f("x")

# }

Run the code above in your browser using DataLab