Helps You to Code Cleaner

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) in 'The C Programming Language' did, be it explicitly as R.C. Martin (2008) 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 instead.

Check your R code for some of the most common layout flaws.


Please read the vignette or, after installation, the help page:

help("cleanr-package", package = "cleanr")
# vignette("cleanr_Introduction", package = "cleanr")


if (! require("devtools")) install.packages("devtools")

cleanr is a fork

of coldr, which was a set of shell scripts I used to check the file layout (number of lines, width of lines and the like) of code files and somehow turned out to be an R package.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.1.3 by Andreas Dominik Cullmann, a month ago

Browse source code at

Authors: Andreas Dominik Cullmann [aut, cre]

Documentation:   PDF Manual  

BSD_2_clause + file LICENSE license

Imports checkmate

Suggests RUnit, knitr, rmarkdown

See at CRAN