cleanr
Helps You to Code Cleaner
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
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
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