Closed dongzhuoer closed 5 years ago
For example, let's look at a sentence in "Programming with dplyr" vignette of dplyr
If this function is in a package, using
.data
also preventsR CMD check
from giving a NOTE about undefined global variables (provided that you've also importedrlang::.data
with@importFrom rlang .data
).
rlang::.data
is linked to https://rlang.r-lib.org/reference/tidyeval-data.html
This is achieved in three steps.
First, DESCRIPTION
of rlang contains the following line:
URL: http://rlang.tidyverse.org, https://github.com/r-lib/rlang
Then pkgdown tries each url, and finds that https://rlang.r-lib.org/pkgdown.yml
does exist:
pandoc: '2.2'
pkgdown: 1.3.0.9000
pkgdown_sha: fa9b7502e80401db4b410086b0a8f6ab444f0c66
articles: []
urls:
reference: https://rlang.r-lib.org/reference
article: https://rlang.r-lib.org/articles
Finally, https://rlang.r-lib.org/reference is used for creating links to functions in rlang
In summary, the user need to do two things:
DESCRIPTION
file's URL
fieldurl
field of pkgdown.yml
as introduced in pkgdown documentationI think this should probably be the start of a new vignette on linking.
I'm very happy to see that link to other package can be customized, rather than just use www.rdocumentation.org .
However, the document is too simple, I have spent a while finding how to achieve this.