Learn R Programming

rgp (version 0.4-1)

makeClosure: Create a new R closure given a function body expression and an argument list

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

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.