Learn R Programming

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

formatR (version 1.3)

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

102,744

Version

1.3

License

GPL

Maintainer

Yihui Xie

Last Published

March 5th, 2016

Functions in formatR (1.3)

tidy_eval

Evaluate R code and mask the output by a prefix
usage

Show the usage of a function
tidy.source

Deprecated functions
tidy_source

Reformat R code while preserving blank lines and comments
tidy_dir

Format the R scripts under a directory
tidy_app

A Shiny app to format R code