Cross-references between packages
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 3
- Forks
- 1
- Avg merge
- 2h 33m
- Merged PRs (30d)
- 1
Description
Is possible to link to an arbitrary help file without that package being on the dependency list?
According to [WRE](https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Cross_002dreferences):
> 11. The Rd files are checked for correct syntax and metadata, including the presence of the mandatory fields (`\name`, `\alias`, `\title` and `\description`). The Rd name and title are checked for being non-empty, and there is a check for missing cross-references (links).
However, on the [cross-reference section](https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Cross_002dreferences):
> Packages referred to by these ‘other forms’ should be declared in the DESCRIPTION file, in the ‘`Depends`’, ‘`Imports`’, ‘`Suggests`’ or ‘`Enhances`’ fields.
In my opinion, other forms refers to the previous methods using an "optional ‘anchor’ argument".
So it should only be possible if the Anchor is a topic `=topic`: `\link[=topic]{text}` (if there is a topic at all and not just `\link{topic}`) and links of the form `\link[pkg:bar]{text}` or `\link[pkg]{text}` the pkg should be on the dependency tree `tools::package_dependencies(pkg, which = "all", recursive = TRUE?)`.
However, this doesn't seem to be checked as suggested by data. The `evmix` package on hillplot.Rd has a link of the form `\link[evir:hill]{hill}` but evir is not on the list of direct dependencies (or even recursive dependencies).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cited R-exts cross-reference rules, then inspect evmix's hillplot.Rd and its DESCRIPTION dependency fields. Compare the handling of \link[pkg:bar], \link[pkg], and topic-only links; done means the repository's expected validation behavior is established and checked against this example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100