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.

output: github_document

Build Status Coverage Status CRAN_Status_Badge Check your R code for some of the most common layout flaws.


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

options(pager = "/bin/cat")
help("cleanr-package", package = "cleanr")


You can install cleanr from github with:

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.3.4 by Andreas Dominik Cullmann, 2 months ago

Browse source code at

Authors: Andreas Dominik Cullmann [aut, cre]

Documentation:   PDF Manual  

BSD_2_clause + file LICENSE license

Imports checkmate, fritools, pkgload, rprojroot

Suggests devtools, rasciidoc, rmarkdown, RUnit, testthat, usethis

Suggested by fakemake, packager.

See at CRAN