
Wrapper for custom replacement functions
Source:R/make_replacement_function.R
make_replacement_function.RdConvert a function for producing a random replacement into a memoized version.
The functionality automates reacalling of the function to avoid collision with existing
replacements, and can toggle between ...
Arguments
- encoder
The function to wrap with signature
function()- max_values
The maximum number of replacements your encoder can produce
- all
Boolean flag. If
TRUEevery key replaced gets its own value. NB: at present this results in the key stored having a number appended e.g. "bob" stored as "bob.1"- elevate_warnings
If true, cause warnings to raise as errors.