Skip to content
Prev 2442 / 12125 Next

[R-pkg-devel] How to (conditionally) use an archived package (without 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.
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'