6.7 Aliasing a function recomendation
Code | Result |
---|---|
foo <- pkgB::blah |
It will fix the definition of pkgB::blah() at the version present on the machine where the binary package is built. But if a bug is discovered in pkgB::blah() and subsequently fixed, the package will still use the older, buggy version, until your package is rebuilt and your users upgrade, which is completely out of your control. |
foo <- function(...) pkgB::blah(...) |
With this little change now if an user calls foo() , the package will work the pkgB::blah() function at the version installed on the user’s machine at that very moment. |