Learn R Programming

⚠️There's a newer version (1.14) of this package.Take me there.

formatR (version 1.2.1)

Format R Code Automatically

Description

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()).

Copy Link

Version

Install

install.packages('formatR')

Monthly Downloads

101,968

Version

1.2.1

License

GPL

Maintainer

Yihui Xie

Last Published

September 18th, 2015

Functions in formatR (1.2.1)

tidy.source

Deprecated functions
tidy_dir

Format the R scripts under a directory
tidy_eval

Evaluate R code and mask the output by a prefix
tidy_app

A Shiny app to format R code
usage

Show the usage of a function
tidy_source

Reformat R code while preserving blank lines and comments