[R-pkg-devel] Package Etiquette
@pencer@gr@ve@ @ending from effectivedefen@e@org
Sun Sep 9 19:01:06 CEST 2018
On 2018-09-09 09:30, Dirk Eddelbuettel wrote:
> Hi Joseph,
> On 8 September 2018 at 21:11, Joseph Wood wrote:
> | I’m a new developer and this is my first post. I have a question regarding
> | package development with regards to duplication of functionality. I read
> | the posting guide (https://www.r-project.org/posting-guide.html) and didn’t
> | see anything addressing this.
I wrote and use sos::findFn to find other packages and functions
that seem to do the same or similar things. A search for software and
books on splines led to an invitation to help maintain and improve the
"fda" package, and then to another invitation to collaborate on a book
on "Functional data analysis with R and Matlab". Another search got me
named the maintainer of the "Ecdat" package, in which I've since fixed
bugs while adding my own material.
Other searches led to functions in other packages I use in the
FinTS package. For that, I use, cite, and compare similar functions in
other packages. My philosophy, like Dirk's I think, is that if someone
else has a function that seems to do what I want, I'd rather let them
maintain it. I will copy it only if I really need something different
that they don't provide and don't want to provide. If I copied
something otherwise, the two copies would likely eventually get out of
sync. Then other users (and I myself) would have trouble determining
which version to use. What a mess. I'll let an existing package author
worry about maintaining what s/he has already written and maintained. I
can worry about other things.
Hope this helps.
> I sense that by actually asking the question (good move!) you already have an
> inkling about the answer. So indeed, _ex ante_ and with the caveat about
> missing details and not knowing more: it is generally a bad thing.
> Every now and then we manage to avoid it. Eg I once had an (incomplete and
> tentative but functional) package to have R interface the (awesome !!)
> MessagePack binary serialization format (using C++ via Rcpp). Then I spotted
> a new package by Travers doing very similar things (in broader scope) via
> R. So I suggested we joing forces, we did and the resulting package is much
> better. So much so that we wrote a (not yet complete) paper about it too.
> But it is a complex topic, and sometimes we need different approaches. And
> the best person to ask may be the maintainer of the package you aim to
> The best answer may be in the _Writing R Extensions_ manual that came with
> your copy of R. It is the only "official" manual for package development.
> | Is this the right place to ask?
> Quite possibly, as it is the list about package development. Some more
> pertinent detail may help, and as mentioned, maybe first talking to the
> maintainer may not be a bad idea.
> But to close: it is not formally forbidden, and duplication _happens_. Good
> judgement always helps, sometimes good judgement is informed by observing
> best (prior) practice. And/or by asking here.
> Hope this helps, Dirk
More information about the R-package-devel