On 15/12/2020 8:02 a.m., Knut Krueger wrote:
I am using in my Package XlConnect. If the Computer is using Java < 11
all is working. But if not, the package can not be used.
inside teh functions tehre is an ' @importFrom XLConnect createSheet
writeWorksheet saveWorkbook
but only used for additional comfort to use excel sheets
The package is usable without XlConnect if I change
Imports: igraph,chron,gdata, XLConnect
to
Imports:
igraph,chron,gdata
Suggests:XLConnect
but then I get the error
checking package dependencies ... ERROR
Namespace dependency not required: ‘XLConnect’
Just now the new version is on my private repository and working with or
without Xlconnect depending on the java version
How can I submit the package to cran until XlConnect is working with
java > 11
You should not have
@importFrom XLConnect createSheet writeWorksheet saveWorkbook
in your ROxygen comments; that results in an unconditional import.
Instead, you should use fully qualified calls each time, i.e.
XLConnect::createSheet, XLConnect::writeWorksheet, XLConnect::saveWorkbook
in your code. You should also wrap every use of those functions in
checks like
if (requireNamespace("XLConnect")) {
run code
} else {
report that you can't run that code
}
and make sure none of your examples or vignettes fail if XLConnect is
not present.
Duncan Murdoch
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel