Skip to contents

Tools for Working with R-universe and its APIs.

Installation and docs

You can install the development version of universe from r-universe:

install.packages("universe", repos = "https://ropensci.r-universe.dev")

Or the development version of universe from GitHub with:

# install.packages("pak")
pak::pak("ropensci/universe")

Documentation is available on https://docs.ropensci.org/universe.

Enable a repository

Use runiverse::add() to opt-in to a package repository (this will modify your options('repos') list).

# Install a package from r-universe
universe::add("ropensci")
install.packages("magick")

For more details see the documentation for runiverse::add().

Get data from the APIs

All packages in an universe

library(universe)
#> 
#> Attaching package: 'universe'
#> The following object is masked from 'package:base':
#> 
#>     remove
universe_ls("jeroen")
#>  [1] "RAppArmor" "V8"        "badgen"    "base64"    "bcrypt"    "brotli"   
#>  [7] "curl"      "gpg"       "js"        "jsonlite"  "maketools" "mongolite"
#> [13] "openssl"   "protolite" "rjade"     "sys"       "unix"      "webp"     
#> [19] "webutils"

Info on all packages in an universe

universe_all_packages("jeroen", limit = 1) |>
  str(max.level = 2)
#> List of 1
#>  $ :List of 71
#>   ..$ Package         : chr "brotli"
#>   ..$ Type            : chr "Package"
#>   ..$ Title           : chr "A Compression Format Optimized for the Web"
#>   ..$ Version         : chr "1.3.2"
#>   ..$ Authors@R       : chr "c(\nperson(\"Jeroen\", \"Ooms\", ,\"jeroenooms@gmail.com\", role = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \""| __truncated__
#>   ..$ Description     : chr "A lossless compressed data format that uses a combination\nof the LZ77 algorithm and Huffman coding\n<https://w"| __truncated__
#>   ..$ License         : chr "MIT + file LICENSE"
#>   ..$ URL             : chr "https://jeroen.r-universe.dev/brotli"
#>   ..$ BugReports      : chr "https://github.com/jeroen/brotli/issues"
#>   ..$ VignetteBuilder : chr "knitr, R.rsp"
#>   ..$ RoxygenNote     : chr "6.0.1"
#>   ..$ Language        : chr "en-US"
#>   ..$ Repository      : chr "https://jeroen.r-universe.dev"
#>   ..$ RemoteUrl       : chr "https://github.com/jeroen/brotli"
#>   ..$ RemoteRef       : chr "HEAD"
#>   ..$ RemoteSha       : chr "ff207e6e8f53674662e91c646cd93637ca34ae30"
#>   ..$ NeedsCompilation: chr "yes"
#>   ..$ Packaged        :List of 2
#>   ..$ Author          : chr "Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>),\nGoogle, Inc [aut, cph] (Brotli C++ library)"
#>   ..$ Maintainer      : chr "Jeroen Ooms <jeroenooms@gmail.com>"
#>   ..$ MD5sum          : chr "148072e31eb43894bf115f4a98200e4c"
#>   ..$ _user           : chr "jeroen"
#>   ..$ _type           : chr "src"
#>   ..$ _file           : chr "brotli_1.3.2.tar.gz"
#>   ..$ _fileid         : chr "49ddfc31a970e46587a50994c5d72971d01cbf0bdeb944700dab34c5c0099808"
#>   ..$ _filesize       : int 887966
#>   ..$ _sha256         : chr "49ddfc31a970e46587a50994c5d72971d01cbf0bdeb944700dab34c5c0099808"
#>   ..$ _created        : chr "2025-04-06T21:15:55.000Z"
#>   ..$ _published      : chr "2025-04-06T21:19:27.333Z"
#>   ..$ _upstream       : chr "https://github.com/jeroen/brotli"
#>   ..$ _commit         :List of 5
#>   ..$ _maintainer     :List of 7
#>   ..$ _distro         : chr "noble"
#>   ..$ _host           : chr "GitHub-Actions"
#>   ..$ _status         : chr "success"
#>   ..$ _pkgdocs        : chr "skipped"
#>   ..$ _winbinary      : chr "success"
#>   ..$ _macbinary      : chr "success"
#>   ..$ _wasmbinary     : chr "success"
#>   ..$ _linuxdevel     : chr "success"
#>   ..$ _windevel       : chr "success"
#>   ..$ _buildurl       : chr "https://github.com/r-universe/jeroen/actions/runs/14296665020"
#>   ..$ _registered     : logi TRUE
#>   ..$ _dependencies   :List of 6
#>   ..$ _owner          : chr "jeroen"
#>   ..$ _selfowned      : logi TRUE
#>   ..$ _usedby         : int 5
#>   ..$ _updates        :List of 4
#>   ..$ _tags           : list()
#>   ..$ _stars          : int 2
#>   ..$ _contributors   :List of 1
#>   ..$ _userbio        :List of 4
#>   ..$ _downloads      :List of 2
#>   ..$ _devurl         : chr "https://github.com/jeroen/brotli"
#>   ..$ _searchresults  : int 16
#>   ..$ _rbuild         : chr "4.4.3"
#>   ..$ _assets         :List of 11
#>   ..$ _homeurl        : chr "https://github.com/jeroen/brotli"
#>   ..$ _realowner      : chr "jeroen"
#>   ..$ _cranurl        : logi TRUE
#>   ..$ _releases       :List of 12
#>   ..$ _exports        :List of 2
#>   ..$ _help           :List of 1
#>   ..$ _readme         : chr "https://github.com/jeroen/brotli/raw/HEAD/README.md"
#>   ..$ _rundeps        : list()
#>   ..$ _vignettes      :List of 2
#>   ..$ _score          : num 6.55
#>   ..$ _indexed        : logi TRUE
#>   ..$ _nocasepkg      : chr "brotli"
#>   ..$ _universes      :List of 1
#>   ..$ _binaries       :List of 13

Info on a single package in an universe

universe_one_package("jeroen", package = "curl") |>
  str(max.level = 1)
#> List of 78
#>  $ Package           : chr "curl"
#>  $ Type              : chr "Package"
#>  $ Title             : chr "A Modern and Flexible Web Client for R"
#>  $ Version           : chr "6.2.3"
#>  $ Authors@R         : chr "c(\nperson(\"Jeroen\", \"Ooms\", role = c(\"aut\", \"cre\"), email = \"jeroenooms@gmail.com\",\ncomment = c(ORC"| __truncated__
#>  $ Description       : chr "Bindings to 'libcurl' <https://curl.se/libcurl/> for\nperforming fully configurable HTTP/FTP requests where res"| __truncated__
#>  $ License           : chr "MIT + file LICENSE"
#>  $ SystemRequirements: chr "libcurl (>= 7.62): libcurl-devel (rpm) or\nlibcurl4-openssl-dev (deb)"
#>  $ URL               : chr "https://jeroen.r-universe.dev/curl"
#>  $ BugReports        : chr "https://github.com/jeroen/curl/issues"
#>  $ VignetteBuilder   : chr "knitr"
#>  $ RoxygenNote       : chr "7.3.2.9000"
#>  $ Encoding          : chr "UTF-8"
#>  $ Language          : chr "en-US"
#>  $ Roxygen           : chr "list(markdown = TRUE)"
#>  $ Config/pak/sysreqs: chr "libssl-dev"
#>  $ Repository        : chr "https://jeroen.r-universe.dev"
#>  $ RemoteUrl         : chr "https://github.com/jeroen/curl"
#>  $ RemoteRef         : chr "HEAD"
#>  $ RemoteSha         : chr "5814c87f68e23a7a36836063097e26d836edc587"
#>  $ NeedsCompilation  : chr "yes"
#>  $ Packaged          :List of 2
#>  $ Author            : chr "Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>),\nHadley Wickham [ctb],\nPosit Software, PBC [cph]"
#>  $ Maintainer        : chr "Jeroen Ooms <jeroenooms@gmail.com>"
#>  $ MD5sum            : chr "97be62c80717e9aef79f73a6cda4e175"
#>  $ _user             : chr "jeroen"
#>  $ _type             : chr "src"
#>  $ _file             : chr "curl_6.2.3.tar.gz"
#>  $ _fileid           : chr "d89416d8af34e45d925c4405b7342c34986070ccc03f8e9024cc2186deb77442"
#>  $ _filesize         : int 529093
#>  $ _sha256           : chr "d89416d8af34e45d925c4405b7342c34986070ccc03f8e9024cc2186deb77442"
#>  $ _created          : chr "2025-04-02T12:15:23.000Z"
#>  $ _published        : chr "2025-04-02T12:21:11.694Z"
#>  $ _upstream         : chr "https://github.com/jeroen/curl"
#>  $ _commit           :List of 5
#>  $ _maintainer       :List of 7
#>  $ _distro           : chr "noble"
#>  $ _host             : chr "GitHub-Actions"
#>  $ _status           : chr "success"
#>  $ _pkgdocs          : chr "skipped"
#>  $ _winbinary        : chr "success"
#>  $ _macbinary        : chr "success"
#>  $ _wasmbinary       : chr "none"
#>  $ _linuxdevel       : chr "success"
#>  $ _windevel         : chr "success"
#>  $ _buildurl         : chr "https://github.com/r-universe/jeroen/actions/runs/14219283135"
#>  $ _registered       : logi TRUE
#>  $ _dependencies     :List of 9
#>  $ _owner            : chr "jeroen"
#>  $ _selfowned        : logi TRUE
#>  $ _usedby           : int 5868
#>  $ _updates          :List of 24
#>  $ _tags             :List of 2
#>  $ _stars            : int 221
#>  $ _contributors     :List of 23
#>  $ _userbio          :List of 4
#>  $ _downloads        :List of 2
#>  $ _mentions         : int 21
#>  $ _devurl           : chr "https://github.com/jeroen/curl"
#>  $ _searchresults    : int 3968
#>  $ _topics           :List of 1
#>  $ _rbuild           : chr "4.4.3"
#>  $ _assets           :List of 11
#>  $ _homeurl          : chr "https://github.com/jeroen/curl"
#>  $ _realowner        : chr "jeroen"
#>  $ _cranurl          : logi TRUE
#>  $ _releases         :List of 52
#>  $ _exports          :List of 42
#>  $ _help             :List of 19
#>  $ _readme           : chr "https://github.com/jeroen/curl/raw/HEAD/README.md"
#>  $ _rundeps          : list()
#>  $ _sysdeps          :List of 1
#>  $ _vignettes        :List of 2
#>  $ _score            : num 20.1
#>  $ _indexed          : logi TRUE
#>  $ _nocasepkg        : chr "curl"
#>  $ _universes        :List of 1
#>  $ _binaries         :List of 11

Search within a single universe

universe_search("ropensci", query = 'needs:httr2', limit = 1) |>
  str(max.level = 2)
#> List of 5
#>  $ results:List of 1
#>   ..$ :List of 14
#>  $ query  :List of 2
#>   ..$ _universes: chr "ropensci"
#>   ..$ _rundeps  : chr "httr2"
#>  $ skip   : int 0
#>  $ limit  : int 1
#>  $ total  : int 34

Search among all universes

global_search(query = '"weather data"', limit = 1) |>
  str(max.level = 2)
#> List of 5
#>  $ results:List of 1
#>   ..$ :List of 15
#>  $ query  :List of 1
#>   ..$ $text:List of 2
#>  $ skip   : int 0
#>  $ limit  : int 1
#>  $ total  : int 77