Am 02.02.2021 um 22:37 schrieb Duncan Murdoch:
On 02/02/2021 9:13 a.m., Ulrike Grömping wrote:
Am 02.02.2021 um 02:38 schrieb Duncan Murdoch:
On 01/02/2021 5:03 p.m., Ulrike Grömping wrote:
Dear package developeRs,

under the Fedora clang checks, I find the note

"Undeclared packages ‘FrF2’, ‘DoE.wrapper’, ‘sfsmisc’, ‘DoE.MIParray’,
‘planor’ in Rd xrefs"

for my package DoE.base. I understand that package planor has been
archived from CRAN; I don't understand what is wrong with the other
xrefs; only the R-Devel Fedora clang flavor seems to complain, and I did not find an explanation in the section on cross references in Writing R
Extensions. Can someone explain the meaning of this note?

There's a line in the Writing R Extensions manual section 2.5
Cross-refernces for R-devel that says:

"Packages referred to by these ‘other forms’ should be declared in the
DESCRIPTION file, in the ‘Depends’, ‘Imports’, ‘Suggests’ or
‘Enhances’ fields."

The other forms are the forms of links to other packages.  So
presumably you don't mention those packages in your DESCRIPTION file.
Generally that means they should be listed in Suggests, which doesn't
force them to be installed, but they will be installed during tests.
You might also argue they should be in Enhances, though that seems a
worse fit.

Duncan Murdoch


Thank you for the explanation! I will remove the xref to sfsmisc
(because it does not make sense to suggest that package). The three
other still available packages all depend on or import DoE.base. Thus,
if I incorporate them in Suggests, I will create a circular dependence
structure. Doesn't that create problems?

It creates small problems, not serious ones. You just need to make sure that a version of your package is available when those packages are installed for testing.  So things need to happen in something like this order on a totally new machine:

 - install the "hard" dependencies for your package.
 - install your package
 - install the "soft" dependencies for your package.

I just discovered that the remotes::install_deps(dependencies = TRUE) function can't currently do things in the right order, but remotes::install_local(dependencies = TRUE) is fine.  I didn't check the base function install.packages(dependencies = TRUE).

Duncan Murdoch

Thank you! I don't like that very much, because exactly those users who are totally new to using R are extremely put off by this type of difficulty. I think that I will try to solve this differently, e.g. by showing the code for calling these help files from R without linking to them from within the Rd file. I am not sure what the benefits are of this demand - but I do see the drawbacks here.

Best,
Ulrike Grömping

--
##############################################
## Prof. Ulrike Groemping
## FB II
## Beuth University of Applied Sciences Berlin
##############################################
## prof.beuth-hochschule.de/groemping
## Phone: +49(0)30 4504 5127
## Fax:   +49(0)30 4504 66 5127
## Home office: +49(0)30 394 04 863
##############################################

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to