Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MangoTheCat/goodpractice
Advice on R Package Building
https://github.com/MangoTheCat/goodpractice
Last synced: 3 months ago
JSON representation
Advice on R Package Building
- Host: GitHub
- URL: https://github.com/MangoTheCat/goodpractice
- Owner: ropensci-review-tools
- License: other
- Created: 2016-01-31T16:46:37.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-06-05T12:41:37.000Z (5 months ago)
- Last Synced: 2024-06-11T16:08:16.651Z (5 months ago)
- Language: R
- Homepage: https://docs.ropensci.org/goodpractice/
- Size: 473 KB
- Stars: 427
- Watchers: 16
- Forks: 35
- Open Issues: 39
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
- Codemeta: codemeta.json
Awesome Lists containing this project
README
---
output: github_document
---```{r, setup, include = FALSE}
#, echo = FALSE, message = FALSE}
knitr::opts_chunk$set(
echo = TRUE,
comment = "#>",
tidy = FALSE,
error = FALSE,
fig.width = 8,
fig.height = 8)
```# goodpractice
[![R-CMD-check](https://github.com/ropensci-review-tools/goodpractice/workflows/R-CMD-check/badge.svg)](https://github.com/ropensci-review-tools/goodpractice/actions)
[![CRAN status](https://www.r-pkg.org/badges/version/goodpractice)](https://CRAN.R-project.org/package=goodpractice)
[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/goodpractice)](https://www.r-pkg.org/pkg/goodpractice)
[![Codecov test coverage](https://codecov.io/gh/ropensci-review-tools/goodpractice/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ropensci-review-tools/goodpractice?branch=main)
## Advice on R Package Building
Give advice about good practices when building R packages. Advice includes
functions and syntax to avoid, package structure, code complexity, code
formatting, etc.## Installation
You can install the release version from CRAN
```{r eval = FALSE}
install.packages("goodpractice")
```and the development version from GitHub
```{r eval = FALSE}
pak::pak("ropensci-review-tools/goodpractice")
```## Usage
```r
library(goodpractice)
gp("")
```## Example
```{r, message = FALSE, warning = FALSE}
library(goodpractice)
# use example package contained in the goodpractice package
pkg_path <- system.file("bad1", package = "goodpractice")
g <- gp(pkg_path)
g# show all available checks
# all_checks()# run only a specific check
g_url <- gp(pkg_path, checks = "description_url")
g_url# which checks were carried out?
checks(g_url)# which checks failed?
failed_checks(g)# show the first 5 checks carried out and their results
results(g)[1:5,]
```## License
MIT © 2022 Ascent Digital Services UK Limited