Learn R Programming

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

formatR (version 0.2-4)

Format R Code Automatically

Description

This package provides a function tidy.source() and optionally a GUI (by gWidgets and prefers gWidgetsRGtk2) 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.

Copy Link

Version

Install

install.packages('formatR')

Monthly Downloads

118,995

Version

0.2-4

License

GPL-2 | GPL-3

Maintainer

Yihui Xie

Last Published

September 29th, 2011

Functions in formatR (0.2-4)

tidy.eval

Evaluate the R code and mask the output by a prefix
tidy.source

`Tidy up' R code while preserving comments
parse.tidy

Modified versions of parse() and deparse()
usage

Show the usage of a function
tidy.dir

Format the R scripts under a directory
unmask.source

Restore the real source code from the masked text
%InLiNe_IdEnTiFiEr%

A weird operator for internal use only
formatR

A GUI to format R code