-
Notifications
You must be signed in to change notification settings - Fork 6
/
README.Rmd
140 lines (105 loc) · 4.82 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
[![R-CMD-check](https://github.com/fmichonneau/foghorn/actions/workflows/check-full.yaml/badge.svg)](https://github.com/fmichonneau/foghorn/actions/workflows/check-full.yaml)
[![Coverage Status](https://img.shields.io/codecov/c/github/fmichonneau/foghorn/master.svg)](https://app.codecov.io/github/fmichonneau/foghorn?branch=master)
[![CRAN version](https://www.r-pkg.org/badges/version/foghorn)](https://www.r-pkg.org/pkg/foghorn)
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/foghorn)](https://www.r-pkg.org/pkg/foghorn)
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# foghorn <img src="man/figures/logo.png" align="right" />
> **foghorn** *noun* <br>
> 1. Device used to facilitate navigation in foggy conditions by warning of
> potential hazards ahead.
`foghorn` makes accessible to the R terminal the CRAN check results for packages
maintained by individuals, or for other packages of interest. The results are
presented as a colored summary, or as a tibble. The function that generates the
summary is designed to be called from your `.Rprofile` so you can check on the
status of the packages regularly.
As new features are introduced in development versions of R, or new policies are
put in place, packages that are not updated frequently may start generating
warnings or errors when checked on CRAN's infrastructure. `foghorn` brings this
information to your terminal so you don't have to leave the comfort of your
R session to know the results of the CRAN checks for your packages.
## Installation
You can install the development version of **`foghorn`** from GitHub with:
```{r gh-installation, eval = FALSE}
pak::pkg_install("fmichonneau/foghorn")
```
or the stable version from CRAN:
```{r cran-install, eval=FALSE}
install.packages("foghorn")
```
## Demonstration
```{r example}
## load the package
library(foghorn)
```
`foghorn` provides the results of the package CRAN checks. As a maintainer, you
can easily get the results of the checks for your packages by using the email
address included in the `DESCRIPTION` file of your packages.
`summary_cran_results()` provides you with a graphical summary of the results of
the CRAN checks. The number in parenthesis after the name of the package
indicates the number of platforms used by CRAN that produced this result. If
CRAN has set a deadline by which your package needs to be updated before it gets
archived, that date will be shown in the output.
```{r graphical-interface}
## Graphical interface
summary_cran_results(email = "[email protected]", pkg = "lme4")
```
`summary_cran_results()` is actually an alias of `summary(cran_results())`,
meaning that you can call `cran_results()` directly if you want to easily access
the underlying data for the results of the CRAN checks. These results are stored
in a tibble.
```{r tibble}
## Results of the checks as a tibble
cran_results(email = "[email protected]")
```
In addition of your own packages, you can also check the results for any other
packages that might be of interest to you:
```{r package-name}
## either by themselves
summary_cran_results(pkg = c("ggplot2", "dplyr"))
cran_results(pkg = c("ggplot2", "dplyr"))
## or by combining them with email addresses
summary_cran_results(
email = "[email protected]",
pkg = c("arrow", "duckdb")
)
cran_results(
email = "[email protected]",
pkg = c("arrow", "duckdb")
)
```
You can inspect the logs for the check results using `summary_cran_details(pkg)`
(or `summary(cran_details(pkg))`), while `visit_cran_check(pkg)` takes you
directly to the CRAN webpage.
```{r cran-details}
(tidyr_checks <- cran_details(pkg = "tidyr"))
summary(tidyr_checks)
```
## Where does the data come from?
The data from the check results used by this package are either scraped from
the CRAN web pages (default), or are from the CRAN database (that CRAN uses to
build the webpages). The first option is faster if you want to regularly check a
few packages. However, if you are doing statistics on a large number of
packages, using the CRAN database is recommended (it's about 20Mb of data). To
use the CRAN database, add `src = "crandb"` in your function calls:
```{r show-cran-db}
cran_results(pkg = "nlme", src = "crandb", progress = FALSE)
```
Check out the "Details" section in the help files for more information.
## Feedback? Suggestions?
Feel free to submit feedback and suggestions
by [opening an issue](https://github.com/fmichonneau/foghorn/issues/new) on
GitHub.
## Code of Conduct
Please note that this project is released with
a [Contributor Code of Conduct](https://fmichonneau.github.io/foghorn/CODE_OF_CONDUCT.html). By participating in this project
you agree to abide by its terms.