You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For any package it is possible to search whether it is on R-universe, for instance:
# is babelquarto on R-universename<-"babelquarto"package<-httr2::request("https://r-universe.dev/api/search") |>httr2::req_url_query(q= sprintf('package:%s', "babelquarto")) |>httr2::req_perform() |>httr2::resp_body_json()
str(package, max.level=1)
#> List of 5#> $ results:List of 1#> $ query :List of 1#> $ skip : int 0#> $ limit : int 100#> $ total : int 1# fortunately there is only one package with that name# what universeuniverse<-package$results[[1]]$`_user`# topicspackage_info<-httr2::request(
sprintf(
"https://%s.r-universe.dev/api/packages/%s",
universe, name
)
)|>httr2::req_perform() |>httr2::resp_body_json()
# so an URL is# although probably no need to use the API to find what topic a function belongs totopic<-"render_book"topic_info<-purrr::keep(package_info$`_help`, \(x) topic%in%x$topics)
if (length(topic_info) ==1) {
sprintf(
"https://%s.r-universe.dev/%s/doc/manual.html#%s",
universe, name, topic_info[[1]]$page
)
}
#> [1] "https://ropensci.r-universe.dev/babelquarto/doc/manual.html#render"
FI - It doesn't look like the refmans at https://search.r-project.org/ are automatically updated at the moment so you probably want to hold fire for the time being.
Would you consider allowing users to specify the use of the help pages at https://search.r-project.org as opposed to https://rdrr.io/ (or perhaps any arbitrary alternative)?
E.g. it would be nice if we could make
grep()
documentation linked tohttps://search.r-project.org/R/refmans/base/html/grep.html
instead of
https://rdrr.io/r/base/grep.html
The text was updated successfully, but these errors were encountered: