makeClosure: Create a new R closure given a function body expression and...

Description Usage Arguments Value

View source: R/function_utils.r

Description

Creates a R closure (i.e. a function object) from a body expression and an argument list. The closure's environment will be the default environment.

Usage

1
makeClosure(fbody, fargs, envir = globalenv())

Arguments

fbody

The function body, given as a R expression.

fargs

The formal arguments, given as a list or vector of strings.

envir

The new function closure's environment, defaults to globalenv().

Value

A formal argument list, ready to be passed via formals.


rgp documentation built on May 30, 2017, 12:45 a.m.