From wdunlap at tibco.com  Thu Apr  7 23:17:04 2016
From: wdunlap at tibco.com (William Dunlap)
Date: Thu, 7 Apr 2016 14:17:04 -0700
Subject: [Rd] (no) circular dependency
In-Reply-To: <CAJL_pogb2JA1PapYYurnCQxSK1LZdwy31rmRXF4Cx71-GkEPgQ@mail.gmail.com>
References: <CAJL_pohRgoxg0M4kGDttQOq940riyyRrZ0Y7_w0uRHtR1b0ZOw@mail.gmail.com>
	<CAJuCY5x41vsDuHz_yeQK03W_god5ndz7GMw1H-8u379bi+RHAw@mail.gmail.com>
	<CAJL_pogb2JA1PapYYurnCQxSK1LZdwy31rmRXF4Cx71-GkEPgQ@mail.gmail.com>
Message-ID: <CAF8bMcYWpvOoBRVFkvRexnakvMZwS7D9bKW8BoGoR3mkHqp-uQ@mail.gmail.com>

> but this strategy quickly inflates the number of packages on CRAN.

CRAN contains 8210 packages today, so I would not worry about
adding an extra one.

Also, I think several small packages are preferable to one large one
because attaching a big one just to get the one or two functions you
want is also a waste.


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Thu, Apr 7, 2016 at 1:22 PM, Dmitri Popavenko <dmitri.popavenko at gmail.com
> wrote:

> Hi Thierry,
>
> Thanks for that, the trouble is functions are package specific so moving
> from one package to another could be a solution, but I would rather save
> that as a last resort.
>
> As mentioned, creating a package C with all the common functions could also
> be an option, but this strategy quickly inflates the number of packages on
> CRAN. If no other option is possible, that could be the way but I was still
> thinking about a more direct solution if possible.
>
> Best,
> Dmitri
>
> On Thu, Apr 7, 2016 at 3:47 PM, Thierry Onkelinx <thierry.onkelinx at inbo.be
> >
> wrote:
>
> > Dear Dmitri,
> >
> > If it's only a small number of functions then move them the relevant
> > functions for A to B so that B works without A. Then Import these
> functions
> > from B in A. Hence A depends on B but B is independent of A.
> >
> > It is requires to move a lot of functions than you better create a
> package
> > C with all the common functions. Then A and B import those functions
> from C.
> >
> > Best regards,
> >
> > ir. Thierry Onkelinx
> > Instituut voor natuur- en bosonderzoek / Research Institute for Nature
> and
> > Forest
> > team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
> > Kliniekstraat 25
> > 1070 Anderlecht
> > Belgium
> >
> > To call in the statistician after the experiment is done may be no more
> > than asking him to perform a post-mortem examination: he may be able to
> say
> > what the experiment died of. ~ Sir Ronald Aylmer Fisher
> > The plural of anecdote is not data. ~ Roger Brinner
> > The combination of some data and an aching desire for an answer does not
> > ensure that a reasonable answer can be extracted from a given body of
> data.
> > ~ John Tukey
> >
> > 2016-04-06 8:42 GMT+02:00 Dmitri Popavenko <dmitri.popavenko at gmail.com>:
> >
> >> Hello all,
> >>
> >> I would like to build two packages (say A and B), for two different
> >> purposes.
> >> Each of them need one or two functions from the other, which leads to
> the
> >> problem of circular dependency.
> >>
> >> Is there a way for package A to import a function from package B, and
> >> package B to import a function from package A, without arriving to
> >> circular
> >> dependency?
> >> Other suggestions in the archive mention building a third package that
> >> both
> >> A and B should depend on, but this seems less attractive.
> >>
> >> I read about importFrom() into the NAMESPACE file, but I don't know how
> to
> >> relate this with the information in the DESCRIPTION file (other than
> >> adding
> >> each package to the Depends: field).
> >>
> >> Thank you,
> >> Dmitri
> >>
> >>         [[alternative HTML version deleted]]
> >>
> >> ______________________________________________
> >> R-devel at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-devel
> >>
> >
> >
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

	[[alternative HTML version deleted]]



[Rd] (no) circular dependency
William Dunlap