Build Status AppVeyor Build Status Project Status: Active – The project has reached a stable, usable state and is being actively developed. codecov cran version

The goal of styler is to provide non-invasive pretty-printing of R source code while adhering to the tidyverse formatting rules. Support for custom style guides is planned.

You can install the package from GitHub:

# install.packages("remotes")

You can style a simple character vector of code with style_text():

ugly_code <- "a<-function( x){1+1}           "
#> a <- function(x) {
#>   1 + 1
#> }

There are a few variants of style_text():