new.function: Create a new function stub

Description Usage Arguments Value Note

View source: R/function_utils.r

Description

Creates and returns a new function stub without capturing any environment variables.

Usage

1

Arguments

envir

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

Value

A new function that does not take any arguments and always returns NULL.

Note

Always use this function to dynamically generate new functions that are not clojures to prevent hard to find memory leaks.


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