Helps You to Code Cleaner
Overview
Check your R code for some of the most common layout flaws. Many tried to teach us how to write code less dreadful, be it implicitly as B. W. Kernighan and D. M. Ritchie (1988) <ISBN:0-13-110362-8> in 'The C Programming Language' did, be it explicitly as R.C. Martin (2008) <ISBN:0-13-235088-2> in 'Clean Code: A Handbook of Agile Software Craftsmanship' did. So we should check our code for files too long or wide, functions with too many lines, too wide lines, too many arguments or too many levels of nesting. Note: This is not a static code analyzer like pylint or the like. Checkout https://cran.r-project.org/package=lintr instead.
- Omitted examples in documentation of unexported functions as requested by CRAN.
- Bumped version due to fritools back on CRAN.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-24
- ERROR12 OK, 1 ERROR2026-07-23
- OK13 OK2026-06-09
Show 4 earlier changesHide 4 earlier changes
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-04-02
- ERROR13 OK, 1 ERROR2026-04-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 16 (5 internal)includes a package overview page
- Examples that run
- 100%10 run in a plain check
- Exported functions with examples
- 83%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Also includes 1 demo script (run with demo())
Downloads
Repository
Repository gitlab.com/fvafrcu/cleanr is linked, but repository-practices checks have not run for it yet. Checks are GitHub-only for now.
Dependencies
Installing cleanr adds 17 packages (8 with compiled code, 4.3 MB of source tarballs). Heaviest: fs 1.4 MB, rlang 766 KB, cli 629 KB.
Code & Tests
People & History
Maintainer since 1.1.2 (2016)
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- unarchivedReturned to CRAN2023-06-16
- 1.4.0Latest
- RR 4.3.0 released · 2023-04-21
- archivedRemoved from CRAN2022-09-04requires archived package 'fritools'
- 1.3.52022-08-11 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.3.42021-11-14 · diff ↗
- 1.3.32021-08-03 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.3.22021-05-11 · diff ↗
- 1.3.12020-11-20 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 1.3.02020-01-09 · diff ↗
Package metadata
- First published
- 2016-12-21
- Total releases
- 10 / 10 yrs
- License
- BSD_2_clause + file LICENSE OSI
- Minimum R
- ≥ 3.3.0
- Download size
- 159 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("cleanr")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.