formatR: Format R Code Automatically

Provides a function tidy_source() to format R source code. Spaces and indent will be added to the code automatically, and comments will be preserved under certain conditions, so that R code will be more human-readable and tidy. There is also a Shiny app as a user interface in this package (see tidy_app()).

Getting started

Package details

AuthorYihui Xie [aut, cre] (<https://orcid.org/0000-0003-0645-5666>), Ed Lee [ctb], Eugene Ha [ctb], Kohske Takahashi [ctb], Pavel Krivitsky [ctb]
MaintainerYihui Xie <xie@yihui.name>
LicenseGPL
Version1.14
URL https://github.com/yihui/formatR
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("formatR")

Try the formatR package in your browser

Any scripts or data that you put into this service are public.

formatR documentation built on Jan. 18, 2023, 1:09 a.m.