"Declare" child functions, allowing much tidier code
Only call this within a function, say
f. The named functions are copied into the environment of
f, with their environments set to the environment of
f. This means that when you call one of the named functions later in
f, it will be able to see all the variables in
f, just as if you had defined the function inside
localfuncs avoids you having to clutter
f with definitions of child functions. It differs from
mlocal in that the local functions won't be changing objects directly in
f unless they use
<<- – they will instead have normal R lexical scoping.
character vector of function names
mlocal for a different approach
1 2 3 4 5 6 7 8 9 10 11 12
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.