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_writestored 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_writefunction of the package by my local modified version.modules::usewould only import the modified function but would not replace the package version ofredcap_writeInstall a forked version of
REDCapRpackage, that I created here https://github.com/dmongin/REDCapR/tree/overwrite. But I don't know how to do in a simple manner (uninstallingREDCapRto install my forked version would be a bit tidious: we share the code between various developper/users, each should uninstall and reinstall the package)