On Thu, Aug 22, 2013 at 2:03 PM, Hadley Wickham <h.wickham@gmail.com> wrote:
>> To avoid the NOTEs (which often triggers a 'pls fix' upon submission to
>> CRAN), I simply copied/pasted these functions to my package, but this
seems
>> wasteful.

>Wasteful of disk space, but disk space is cheap. It's less wasteful of
>your time, if the referenced code breaks in an unexpected time.  Your
>time is much more valuable than disk space.

On the other hand, it's quite dangerous software design. What if the
original author finds a bug and implements a fix, but you don't hear about
it?

Furthermore, what happens when I come along and need the same
functionality? Sure I could make a copy, but maybe I only know about your
copy and don't know it is a copy of something else, so now we have a copy
of a copy, which is even more problematic. Using ::: prevents this issue.

Using ::: also allows us to get the credit for the idea/functionality
right, which is important and which our field could stand for some
improvement on.

I would argue, though, in response to the original question that if you
have functions that you, yourself are using in multiple packages, or that
you know other people are going to want to use, that is an indication that
the function is broadly useful and really should be exported from somewhere
(either the package it lives in now or a lightweight dependency/utility
package where you collect all such functions you create).

The much muddier issue is what to do when someone has written a function
that *almost* does what you want, but has a hardcoded limitation in it that
prevents you from using it. That situation is harder to deal with imo
unless the maintainer of the package is open to patches/pull requests.

~G



-- 
Gabriel Becker
Graduate Student
Statistics Department
University of California, Davis

	[[alternative HTML version deleted]]

