Skip to content

cleanr

Helps You to Code Cleaner

v1.4.0 · Jun 16, 2023 · BSD_2_clause + file LICENSE

Description

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.

Downloads

301

Last 30 days

13419th

844

Last 90 days

3.4K

Last year

Trend: -0.7% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 2, 2026
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Apr 1, 2026
ERROR r-devel-linux-x86_64-debian-gcc

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘cleanr_Introduction.Rasciidoc’ using rasciidoc
Warning in run_knit(file_name, knit = knit, envir = envir, write_to_disk = write_to_disk) :
  Setting option knit to TRUE based on the file conte
...[truncated]...
cs:
could not find repository at '/tmp/RtmpQvnmwo/asciidoc'
--- failed re-building ‘cleanr_Introduction.Rasciidoc’

SUMMARY: processing the following file failed:
  ‘cleanr_Introduction.Rasciidoc’

Error: Vignette re-building failed.
Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (2)

suggests

Dependency Network

Dependencies Reverse dependencies checkmate fritools pkgload rprojroot fakemake packager cleanr

Version History

new 1.4.0 Mar 10, 2026
updated 1.4.0 ← 1.3.5 diff Jun 15, 2023
updated 1.3.5 ← 1.3.4 diff Aug 10, 2022
updated 1.3.4 ← 1.3.3 diff Nov 13, 2021
updated 1.3.3 ← 1.3.2 diff Aug 2, 2021
updated 1.3.2 ← 1.3.1 diff May 10, 2021
updated 1.3.1 ← 1.3.0 diff Nov 19, 2020
updated 1.3.0 ← 1.2.0 diff Jan 8, 2020
updated 1.2.0 ← 1.1.3 diff Mar 21, 2019
updated 1.1.3 ← 1.1.2 diff Jan 17, 2017
new 1.1.2 Dec 20, 2016