makeFunction_se: Build an anonymous function.

Description Usage Arguments Value See Also Examples

View source: R/lambda.R

Description

Build an anonymous function.

Usage

1
makeFunction_se(params, body, env = parent.frame())

Arguments

params

formal parameters of function, unbound names.

body

substituted body of function to map arguments into.

env

environment to work in.

Value

user defined function.

See Also

lambda, defineLambda, named_map_builder

Examples

1
2
3
4
5
6
f <- makeFunction_se(as.name('x'), substitute({x*x}))
f(7)


g <- makeFunction_se(c(as.name('x'), as.name('y')), substitute({ x + 3*y }))
g(1,100)

WinVector/wrapr documentation built on Nov. 21, 2020, 8:31 p.m.