Learn R Programming

wrapr (version 1.9.6)

as.UnaryFn: Convert a list of UnaryFns into a UnaryFn.

Description

Unary functions are evaluated in left to right or first to last order.

Usage

as.UnaryFn(items, env = parent.frame())

Arguments

items

list of UnaryFn derived instances.

env

environment to work in.

Value

UnaryFnList

See Also

pkgfn, wrapfn, srcfn

Examples

Run this code
# NOT RUN {
f <- as.UnaryFn(list(pkgfn("base::sin", "x"), pkgfn("base::cos", "x")))
cat(format(f))
1:3 %.>% f

# }

Run the code above in your browser using DataLab