Package 'universe'

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-11-21 05:51:01 UTC
Source: https://github.com/ropensci/universe

Help Index


Enable a package repository from r-universe

Description

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.

Usage

add(universe = "ropensci")

remove(universe)

Arguments

universe

vector with name(s) of the universe(s), i.e. the subdomain part of ⁠https://ropensci.r-universe.dev⁠.

Details

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.

Value

the updated list of repositories

Examples

add("ropensci")

All universes

Description

All universes

Usage

everyone(type = c("all", "universes", "maintainers"))

Arguments

type

Type of universe to query: "all", only organizations ("universe"), personal accounts ("maintainer").

Value

A character vector of all universes.

Examples

head(everyone())

Download snapshot

Description

Downloads a full copy (snapshot) of an R package repository.

Usage

repo_snapshot(repo, destdir = "snapshot", bin_versions = r_version())

r_version()

Arguments

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.

Value

None, used for its side-effects.

Examples

repo_snapshot(
  "https://jeroen.r-universe.dev",
   bin_versions = c("4.1", "4.2", "4.3")
)

Info on all packages in an universe

Description

Info on all packages in an universe

Usage

universe_all_packages(universe, limit = 100L)

Arguments

universe

Name of the universe (character of length 1)

limit

Number of results to return (integer of length 1)

Value

A list with information on all packages in the universe.

See Also

Other universe: universe_ls(), universe_one_package(), universe_search()

Examples

universe_all_packages("jeroen")
universe_all_packages("ropensci")

All packages in an universe

Description

All packages in an universe

Usage

universe_ls(universe)

Arguments

universe

Name of the universe (character of length 1)

Value

A character vector of all packages in the universe.

See Also

Other universe: universe_all_packages(), universe_one_package(), universe_search()

Examples

universe_ls("jeroen")
universe_ls("ropensci")

Info on a single packages in an universe

Description

Info on a single packages in an universe

Usage

universe_one_package(universe, package)

Arguments

universe

Name of the universe (character of length 1)

package

Name of the package (character of length 1)

Value

A list with information on the package.

See Also

Other universe: universe_all_packages(), universe_ls(), universe_search()

Examples

universe_one_package("jeroen", package = "curl")