-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
64 lines (42 loc) · 2.51 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
---
output: github_document
---
# CTU Berns R Package universe <a href="https://ctu-bern.r-universe.dev/"><img src='logo.png' align="right" height="200"></a>
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
R package universes are similar a bit like mini-CRANs. 'The system automatically tracks registered git repositories containing R packages, builds binaries for Windows and MacOS, renders vignettes, and makes all data available through dashboards, feeds and APIs on personal subdomains'.
CTU Berns universe is [here](https://ctu-bern.r-universe.dev).
## Packages in the universe
```{r , echo = FALSE, message = FALSE, results='hide'}
pkgs <- jsonlite::stream_in(url("https://ctu-bern.r-universe.dev/stats/descriptions/"))
pkgs <- pkgs[order(pkgs$Package), ]
pkgs$Description <- gsub("\n", " ", pkgs$Description, fixed = TRUE)
```
```{r pressure, echo=FALSE, results='asis'}
knitr::kable(do.call("rbind", lapply(pkgs$Package, function(x) {
data.frame(package = glue::glue("[`{x}`]({pkgs$RemoteUrl[pkgs$Package == x]})"),
description = pkgs$Description[pkgs$Package == x],
status = glue::glue("  "))
})))
```
## For users...
All vignettes are accessible via the [articles button](https://ctu-bern.r-universe.dev/ui#articles) on the universe page.
To use the universe, in R, do the following, which adds the universe to your list of repos (when installing packages, R will cycle through the repos until it finds the appropriate package)...
```{r, eval = FALSE}
options(repos = c(CTU = "https://ctu-bern.r-universe.dev",
CRAN = "https://cran.rstudio.com/"))
```
It is then possible to install universe packages as if they were CRAN packages...
```{r, eval = FALSE}
install.packages("accrualPlot")
```
Alternatively, you can install without setting the option:
```{r, eval = FALSE}
install.packages("accrualPlot", repos = "https://ctu-bern.r-universe.dev")
```
## For maintainers...
A dashboard of the included packages and build status can be found [here](https://ctu-bern.r-universe.dev/ui#builds).
Briefly, packages should be added to [packages.json](packages.json). They are then tracked on [r-universe](https://github.com/r-universe/ctu-bern) and built each hour. [See here for further details of universes](https://ropensci.org/blog/2021/06/22/setup-runiverse/)
### Acknowledgements
The package logo was created with [`ggplot2`](https://ggplot2.tidyverse.org/) and [`hexSticker`](https://github.com/GuangchuangYu/hexSticker).