-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: display package dependencies #2520
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Yeah, probably. I just need to get into the right headspace to push through the display challenges and finish this off. |
Oh except I'll need a translation for the link title and I have just asked all the translators to update 😞. So probably this will need to come later. |
x %in% c( | ||
"base", "compiler", "datasets", "graphics", "grDevices", "grid", | ||
"methods", "parallel", "splines", "stats", "stats4", "tcltk", | ||
"tools", "utils" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better use x %in% rownames(installed.packages(priority="base"))
?
cf. https://stackoverflow.com/questions/21567057/programmatically-get-list-of-base-packages
if (is_base_package(package)) { | ||
href <- NA | ||
} else { | ||
href <- paste0("https://cran.r-project.org/web/packages/", package) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think CRAN would rather want us to create canonical links like
href <- paste0(" https://CRAN.R-project.org/package=", package)
(hostname is case-insensitive, of course)
|
||
if (is.na(href)) { | ||
if (is_base_package(package)) { | ||
href <- NA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For base R packages, we could link to one of the unofficial documentation renderings, e.g.
https://r-universe.dev/manuals/PKG.html
(example: https://r-universe.dev/manuals/parallel.html)https://rdrr.io/r/#PKG
(example: https://rdrr.io/r/#parallel)
To fix #1333