[R-pkg-devel] How to (conditionally) use an archived package (without Suggests)?

Ben Bolker bbolker at gmail.com
Sun Feb 25 10:14:38 CET 2018

Others may comment more knowledgeably, but I think what you want is
impossible due to the combination
of requirements.

  If you want to put it under additional repositories, I suggest Dirk
Eddelbuettel's drat package as a simple way of
generating the required repository structure.

On Sun, Feb 25, 2018 at 3:49 AM, Marius Hofert
<marius.hofert at uwaterloo.ca> wrote:
>>> It does -- except for the 'warning':
>>> '::' or ':::' import not declared from: ‘bar’
>>> 'loadNamespace' or 'requireNamespace' call not declared from: ‘bar’
>> That's because 'bar' is not in Suggests.
> Thinking a bit about it, the reference to
> https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Suggested-packages
> in the email from CRAN does not really apply in my case. It starts
> with "Note that someone wanting to run the examples/tests/vignettes
> may not have a suggested package available...", but what I would need
> is "Note that someone wanting to run an exported function from the
> package may not have a required package available...". It is
> essentially the question whether 'code' from a package can be run
> 'conditionally'. Conceptually, I think it should be possible: If I
> want to run a function from zenplots with an argument specifying
> specifically to use 'loon', then I should get an error if I don't have
> loon installed -- and if I do, then I sure want the code to run.
>>> Uwe wrote:
>>> But you still have
>>> Suggests: loon,
>>> Please fix and resubmit >
>>> ... so it shouldn't appear in 'Suggests' either (I guess). That's why
>>> I also removed it from Suggests, but then (because of the above
>>> warning), I can't submit either.
>> I suspect you didn't run an --as-cran check with no 'loon' available,
>> and if you had, you would have received warnings or errors.
>> If you did run that check and it didn't give warnings or errors,
> I ran the check with '--as-cran' without loon available and only got
> the above namespace warning, no other warnings or errors. And, of
> course, the same on winbuilder.
> Cheers,
> M
> PS: In the meanwhile, I also tried to add 'loon' under
> 'Additional_repositories' via "Additional_repositories:
> https://github.com/waddella/loon", but the check seems to look for a
> subfolder of the form ./src/contrib/PACKAGES and that github repos
> doesn't seem to have this structure, so I got:
> * checking CRAN incoming feasibility ...Warning: unable to access
> index for repository https://github.com/waddella/loon/src/contrib:
>   cannot open URL 'https://github.com/waddella/loon/src/contrib/PACKAGES'
>> then things have changed; sorry for misleading you.
>> Duncan Murdoch
> ______________________________________________
> R-package-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

More information about the R-package-devel mailing list