
Last chance! 50% off unlimited learning
Sale ends in
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 .First.lib
.hack( fun, ...)
assign.to.base( x, what=, where=-1, in.imports=, override.env = TRUE)
x
, defaulting to "replacement." %&% x
.onLoad
method in a namespace. Make sure any copies of the function to be changed that are in the "imports" namespace also get changed.hack( dir, all.files=option.or.default( "ls.all.files", TRUE)) # from '.First.lib' in 'mvbutils'
assign.to.base( "dir", hack( dir, all.files=TRUE))
Run the code above in your browser using DataLab