Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

Commit

Permalink
docs: add vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Oct 8, 2024
1 parent 5e36fbb commit 8ad3630
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
^pkgdown$
^man/universe_query\.Rd$
^\.lintr$
^vignettes/articles$
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ Suggests:
httptest2,
testthat (>= 3.0.0)
Config/testthat/edition: 3
Config/Needs/website: rmarkdown
2 changes: 2 additions & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.R
47 changes: 47 additions & 0 deletions vignettes/articles/starchart.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: "starchart"
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

The goal of starchart is to access the R-universe API.

## All packages in an universe

```{r example}
library(starchart)
universe_ls("jeroen")
```

## Info on all packages in an universe

```{r}
universe_packages("jeroen", limit = 1) |>
str(max.level = 2)
```

## Info on a single package in an universe

```{r}
universe_package("jeroen", package = "curl") |>
str(max.level = 2)
```

## 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)
```

0 comments on commit 8ad3630

Please sign in to comment.