An open API service indexing awesome lists of open source software.

https://github.com/mdsumner/ozcran

find info on Australian CRAN mirrors
https://github.com/mdsumner/ozcran

Last synced: 10 months ago
JSON representation

find info on Australian CRAN mirrors

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(dplyr)
```
# ozcran

[![Travis build status](https://travis-ci.org/mdsumner/ozcran.svg?branch=master)](https://travis-ci.org/mdsumner/ozcran)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/mdsumner/ozcran?branch=master&svg=true)](https://ci.appveyor.com/project/mdsumner/ozcran)
[![Codecov test coverage](https://codecov.io/gh/mdsumner/ozcran/branch/master/graph/badge.svg)](https://codecov.io/gh/mdsumner/ozcran?branch=master)

The goal of ozcran is to check the status and packages available from Australian CRAN mirrors.

## Installation

You can install the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("remotes")
remotes::install_github("mdsumner/ozcran")
```
## Example

This is a basic example which gets the package list from Australian CRAN mirrors and
provides a quick summary.

```{r example}
library(ozcran)

library(dplyr)
db <- oz_db()
dim(db)
```

`db` now is a data frame with lots of fields about every package, and reflects the status of at least five online mirrors. The mirror itself is named in the `repos` column.

Group by repository and find a summary of currency and number of packages.

```{r example-group}
db %>% group_by(repos) %>%
summarize(n = n(), date = max(as.Date(Published), na.rm = TRUE)) %>%
arrange(desc(date))

```

We can also compare to the source CRAN mirror that is in Austria (no kangaroos).

```{r include-austria}
oz_db(include_cran = TRUE) %>% group_by(repos) %>%
summarize(n = n(), date = max(as.Date(Published), na.rm = TRUE)) %>%
arrange(desc(date))

```

---


Please note that the 'ozcran' project is released with a
[Contributor Code of Conduct](https://CODE_OF_CONDUCT.md).
By contributing to this project, you agree to abide by its terms.