[R-pkg-devel] extending a few functions from another package

Facundo Muñoz famuvie at gmail.com
Fri Aug 28 16:46:38 CEST 2015

Dear list,

I have built a package geoRcb (https://github.com/famuvie/geoRcb) which
is an extension of package geoR.
It provides some very specific additional functionality, in the form of
new arguments for only 3 functions from geoR.
It also has some original complementary functions, but otherwise keeps
most of geoR untouched.

To avoid forking the whole geoR package (and duplicating the vast
majority of the code), I only packaged the modified (or original)
functions. However, since these functions make use of some other
internal functions, I used the dirty trick of *implanting* the modified
functions within the geoR namespace

I understand that modifying another package's namespace is very bad.
But I don't see how to proceed correctly in this case without forking
the whole package.

Thanks for your suggestions.

More information about the R-package-devel mailing list