Title: | Tools for Working with R-universe <https://r-universe.dev> |
---|---|
Description: | Utilities to interact with the R-universe platform. Includes functions to manage local package repositories, as well as API wrappers for retrieving data and metadata about packages in r-universe. |
Authors: | Jeroen Ooms [aut, cre] , Maëlle Salmon [aut] |
Maintainer: | Jeroen Ooms <[email protected]> |
License: | Apache License (>= 2) |
Version: | 1.0.0 |
Built: | 2024-12-21 06:26:51 UTC |
Source: | https://github.com/ropensci/universe |
Adds r-universe package repositories to your options("repos")
such
that they are used by default in install.packages()
. If the universe
was already enabled, it will not be added again, hence it is harmless
to call this function multiple times.
add(universe = "ropensci") remove(universe)
add(universe = "ropensci") remove(universe)
universe |
vector with name(s) of the universe(s), i.e. the subdomain
part of |
Note that changes to your options are not permanent. To automatically
enable a repository for every R session, you can call this function in
your ~/.Rprofile
script.
the updated list of repositories
add("ropensci")
add("ropensci")
All universes
everyone(type = c("all", "universes", "maintainers"))
everyone(type = c("all", "universes", "maintainers"))
type |
Type of universe to query: "all", only organizations ("universe"), personal accounts ("maintainer"). |
A character vector of all universes.
head(everyone())
head(everyone())
Search among all universes
global_search(query, limit = 100L)
global_search(query, limit = 100L)
query |
Query string. See R-universe docs. |
limit |
Number of results to return (integer of length 1) |
A list with query results. The total
field indicates the
total number of results and can be used as limit
value in a second call.
global_search(query = '"weather data"', limit = 1) global_search(query = 'needs:httr2', limit = 1)
global_search(query = '"weather data"', limit = 1) global_search(query = 'needs:httr2', limit = 1)
Downloads a full copy (snapshot) of an R package repository.
repo_snapshot(repo, destdir = "snapshot", bin_versions = r_version()) r_version()
repo_snapshot(repo, destdir = "snapshot", bin_versions = r_version()) r_version()
repo |
url of the cran-like repository to snapshot |
destdir |
where to save the snapshots (path). |
bin_versions |
vector with versions of R to download the win/mac binary packages. The default is to download binaries only for your local version. Set to NULL to not download any binaries. |
None, used for its side-effects.
repo_snapshot( "https://jeroen.r-universe.dev", bin_versions = c("4.1", "4.2", "4.3") )
repo_snapshot( "https://jeroen.r-universe.dev", bin_versions = c("4.1", "4.2", "4.3") )
Info on all packages in an universe
universe_all_packages(universe, limit = 100L)
universe_all_packages(universe, limit = 100L)
universe |
Name of the universe (character of length 1) |
limit |
Number of results to return (integer of length 1) |
A list with information on all packages in the universe.
Other universe:
universe_ls()
,
universe_one_package()
,
universe_search()
universe_all_packages("jeroen") universe_all_packages("ropensci")
universe_all_packages("jeroen") universe_all_packages("ropensci")
All packages in an universe
universe_ls(universe)
universe_ls(universe)
universe |
Name of the universe (character of length 1) |
A character vector of all packages in the universe.
Other universe:
universe_all_packages()
,
universe_one_package()
,
universe_search()
universe_ls("jeroen") universe_ls("ropensci")
universe_ls("jeroen") universe_ls("ropensci")
Info on a single packages in an universe
universe_one_package(universe, package)
universe_one_package(universe, package)
universe |
Name of the universe (character of length 1) |
package |
Name of the package (character of length 1) |
A list with information on the package.
Other universe:
universe_all_packages()
,
universe_ls()
,
universe_search()
universe_one_package("jeroen", package = "curl")
universe_one_package("jeroen", package = "curl")
Search within a single universe
universe_search(universe, query, limit = 100L)
universe_search(universe, query, limit = 100L)
universe |
Name of the universe (character of length 1) |
query |
Query string. See R-universe docs. |
limit |
Number of results to return (integer of length 1) |
A list with query results. The total
field indicates the
total number of results and can be used as limit
value in a second call.
Other universe:
universe_all_packages()
,
universe_ls()
,
universe_one_package()
universe_search("ropensci", query = '"weather data"') universe_search("ropensci", query = 'needs:httr2')
universe_search("ropensci", query = '"weather data"') universe_search("ropensci", query = 'needs:httr2')