rOpenSci | New shortlinks to package information and documentation

New shortlinks to package information and documentation

This post is part of a series of technotes about r-universe, a new umbrella project by rOpenSci under which we experiment with various ideas for improving publication and discovery of research software in R. As the project evolves, we will post updates to document features and technical details. For more information, visit the r-universe project page.

On r-universe you can find package repositories from many different organizations and maintainers. But sometimes you just want to lookup a particular CRAN package, without knowing the developer. The new shortlink service lets you navigate or link directly to the r-universe homepage and docs of any established CRAN package.

The root domain{package} redirects to the primary homepage for a package:

The subdomain{package} redirects to package manual page:

Finally the subdomain{package} does not redirect, but returns a JSON blob with links to the package versions and resources. For example:

This shows the package page and maintainer for the gert package, and information on both the current CRAN release and development versions. Right now it returns:

  "package": "gert",
  "maintainer": "Jeroen Ooms <[email protected]>",
  "home": "",
  "release": {
    "version": "1.9.2",
    "date": "2023-06-30T08:43:26.000Z",
    "source": "",
    "repository": "",
    "docs": "",
    "api": ""
  "devel": {
    "version": "1.9000",
    "date": "2023-07-20T11:08:09.000Z",
    "source": "",
    "repository": "",
    "docs": "",
    "api": ""

We can see the release and devel version of this package, with links to the respective sources, cranlike repository, manual, and package metadata.

From the above it can be seen that the gert r-universe page is and the r-universe "repository" from where to install the devel version of gert:

# install 'devel' gert
install.packages("gert", repos = "")

The "api" field shows the JSON url with all the information and metadata about this package:

# Everything there is to know about devel gert
gert <- jsonlite::fromJSON('')

Note that not all packages have a devel version available. CRAN packages that are not found GitHub or GitLab or r-forge only have a release version, for example:

Start discussion