The following problem:
there are three packages foo1, foo2 and foo3 to use with the update of a
package. The availability depends on the configuration of the host
system. f.e java version
If I write in the Description
...
Suggests: foo1, foo2, foo3
....
inside of functions if have:
functionfoo <- function(data,usingpackage {
.....
foo1, foo2 and foo3
if (usingpackage == "foo1") {
do_something
}
.....
if (usingpackage == "foo2") {
do_something
}
....
if (usingpackage == "foo3") {
do_something
}
....
}
But of course it is not possible to get a positive check result.
It starts either with the missing package at suggest statement
or if I remove the suggest statement there is an error
'::' or ':::' imports not declared from:
?foo1? ?foo2? ?foo3?
'loadNamespace' or 'requireNamespace' calls not declared from:
?foo1? ?foo2? ?foo3?
Any hints to solve this issue?
[R-pkg-devel] How to manage using different packages if available (suggests - imports)
3 messages · Duncan Murdoch, Knut Krueger
I don't see your tests for the presence of the package you're using, but if you have those set up properly, the messages you get about some of your suggested packages not being available aren't going to matter, and you can suppress them using by having environment variable _R_CHECK_FORCE_SUGGESTS_ set to "FALSE". If you are worried about a CRAN submission, explain to them in your submission message why they can't have all your suggested packages. Duncan Murdoch
On 18/02/2021 10:36 a.m., Knut Krueger wrote:
The following problem:
there are three packages foo1, foo2 and foo3 to use with the update of a
package. The availability depends on the configuration of the host
system. f.e java version
If I write in the Description
...
Suggests: foo1, foo2, foo3
....
inside of functions if have:
functionfoo <- function(data,usingpackage {
.....
foo1, foo2 and foo3
if (usingpackage == "foo1") {
do_something
}
.....
if (usingpackage == "foo2") {
do_something
}
....
if (usingpackage == "foo3") {
do_something
}
....
}
But of course it is not possible to get a positive check result.
It starts either with the missing package at suggest statement
or if I remove the suggest statement there is an error
'::' or ':::' imports not declared from:
?foo1? ?foo2? ?foo3?
'loadNamespace' or 'requireNamespace' calls not declared from:
?foo1? ?foo2? ?foo3?
Any hints to solve this issue?
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Am 18.02.21 um 16:52 schrieb Duncan Murdoch:
you can suppress them using by having environment variable _R_CHECK_FORCE_SUGGESTS_ set to "FALSE".? If you are worried about a CRAN submission, explain to them in your submission message why they can't have all your suggested packages.
Yes this is my major problem. Thank you for your help Knut
Duncan Murdoch On 18/02/2021 10:36 a.m., Knut Krueger wrote:
The following problem:
there are three packages foo1, foo2 and foo3 to use with the update of a
package. The availability depends on the configuration of the host
system. f.e java version
If I write in the Description
...
Suggests: foo1, foo2, foo3
....
inside of functions if have:
functionfoo <- function(data,usingpackage {
.....
foo1, foo2 and foo3
?? if (usingpackage == "foo1") {
?? do_something
}
.....
if (usingpackage == "foo2") {
?? do_something
}
....
if (usingpackage == "foo3") {
?? do_something
}
....
}
But of course it is not possible to get a positive check result.
It starts either with the missing package at suggest statement
or if I remove the suggest statement there is an error
??? '::' or ':::' imports not declared from:
?????? ?foo1? ?foo2? ?foo3?
???? 'loadNamespace' or 'requireNamespace' calls not declared from:
?????? ?foo1? ?foo2? ?foo3?
Any hints to solve this issue?
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel