I have the following problem - in a script starting like that:
modules::import("modules")
modules::import("futile.logger")
modules::import("data.table")
modules::import("REDCapR")
used as a module using modules::use
in an other script, I would like to use a modified version of the function redcap_write
of the package REDCapR
.
I don't know how to proceed. To my point of view there are two possibilities:
Use a modified version of
redcap_write
stored locally. That would be great, because it would be an easy mofication to share. But I don't know how to force R to replace theredcap_write
function of the package by my local modified version.modules::use
would only import the modified function but would not replace the package version ofredcap_write
Install a forked version of
REDCapR
package, that I created here https://github.com/dmongin/REDCapR/tree/overwrite. But I don't know how to do in a simple manner (uninstallingREDCapR
to install my forked version would be a bit tidious: we share the code between various developper/users, each should uninstall and reinstall the package)