Skip to main content

builtin_as_function

Function builtin_as_function 

Source
fn builtin_as_function(
    args: &[RValue],
    _: &[(String, RValue)],
) -> Result<RValue, RError>
Expand description

as.function(x, envir) — convert a list to a function.

The list should contain named formals and a body as the last element. Example: as.function(list(x=, y=1, quote(x+y))) creates function(x, y=1) x+y.

@param x a list (formals + body) @param envir the environment for the new function @return a function (closure) @namespace base