The rfmt package is intended to improve the readability of R code byreformatting it automatically. It shares many of the objectives of the well-established formatR package, but whereas formatR relies on an ingenious (though necessarily limited) repurposing of the R system decompiler, the rfmt formatter has been constructed from first principles to produce legible and appealing code layout. Thus it comprises a sophisticated layout algorithm (documented in the Google technical report at http://research.google.com/pubs/pub44667.html) and a flexible mechanism for applying layout to code that allows the formatter to be customized to suit a variety of "house styles". This talk will provide an overview of the rfmt system and its ancillaries, highlight aspects of its implementation, and illustrate its use.