-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
90 lines (64 loc) · 2.11 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# universe
<!-- badges: start -->
[![universe status badge](https://ropensci.r-universe.dev/badges/universe)](https://ropensci.r-universe.dev)
[![R-CMD-check](https://github.com/ropensci/universe/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ropensci/universe/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/ropensci/universe/branch/main/graph/badge.svg)](https://codecov.io/gh/ropensci/universe)
<!-- badges: end -->
> Tools for Working with [R-universe](https://r-universe.dev) and its APIs.
## Installation and docs
You can install the development version of universe from r-universe:
``` r
install.packages("universe", repos = "https://ropensci.r-universe.dev")
```
Or the development version of universe from [GitHub](https://github.com/) with:
``` r
# 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).
``` r
# Install a package from r-universe
universe::add("ropensci")
install.packages("magick")
```
For more details see the documentation for [runiverse::add()](https://docs.ropensci.org/universe/reference/add.html).
## Get data from the APIs
### All packages in an universe
```{r example}
library(universe)
universe_ls("jeroen")
```
### Info on all packages in an universe
```{r}
universe_all_packages("jeroen", limit = 1) |>
str(max.level = 2)
```
### Info on a single package in an universe
```{r}
universe_one_package("jeroen", package = "curl") |>
str(max.level = 1)
```
### Search within a single universe
```{r}
universe_search("ropensci", query = 'needs:httr2', limit = 1) |>
str(max.level = 2)
```
### Search among all universes
```{r}
global_search(query = '"weather data"', limit = 1) |>
str(max.level = 2)
```