[R-pkg-devel] [FWD] [CRAN-pretest-archived] CRAN submission JuliaConnectoR 0.5.0
Duncan Murdoch
murdoch@dunc@n @end|ng |rom gm@||@com
Mon Apr 6 17:00:09 CEST 2020
On 06/04/2020 10:49 a.m., Dirk Eddelbuettel wrote:
>
> On 6 April 2020 at 08:38, Ben Bolker wrote:
> | Just reply to the CRAN maintainers and explain this situation. It¨s
> | slightly buried, but the e-mail you received does say:
> |
> | > If you are fairly certain the rejection is a false positive, please reply-all to this
> | > message and explain.
>
> True, but this misses the "Letter of the law" versus the "Spirit of the law".
>
> It might be worth mentioning that use of attach() is seen, to find one poor
> analogy, pretty much like use of global variables these days. "Just because
> you could does not mean you should".
>
> See e.g. one of the first google hits for 'r do not use attach' here:
> https://stackoverflow.com/questions/10067680/why-is-it-not-advisable-to-use-attach-in-r-and-what-should-i-use-instead
I don't have a strong opinion on this: the proposed use seems to be no
worse than library() or require(). Those are fine for users to use, but
are discouraged in a package. If the attach() never happens without an
explicit request from the user (and that's what it sounds like), I'd say
it's probably okay.
However, there is an easy workaround: just return the environment
without attaching it. Then the user has the choice of attaching it, or
using it as a prefix when they call the functions in it. So it's not as
though this will destroy the utility of the package if Stefan isn't
allowed to call attach().
Duncan Murdoch
More information about the R-package-devel
mailing list