hack: Modify standard R functions, including tweaking their default arguments
Description
You probably shouldn't use these...hack lets you easily change the argument defaults of a function. assign.to.base replaces a function in base or utils (or any other package and its namespace) with a modified version, possibly produced by hack. Package mvbutils uses these two to change the default position for library attachment, etc; see the code of .First.lib.
pairlist of arguments and new default values, e.g. arg1=1+2. Things on RHS of equal signs will not be evaluated.
x
function name (a character string)
what
function to replace x, defaulting to "replacement." %&% x
where
where to find the replacement function, defaulting to usual search path
in.imports
usually TRUE, if this is being called from an .onLoad method in a namespace. Make sure any copies of the function to be changed that are in the "imports" namespace also get changed.
override.env
should the replacement use its own environment, or the one that was originally there?