Learn R Programming

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

formatR (version 0.7)

Format R Code Automatically

Description

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

License

GPL-2 | GPL-3

Maintainer

Yihui Xie

Last Published

December 2nd, 2012

Functions in formatR (0.7)

tidy.dir

Format the R scripts under a directory
parse.tidy

Modified versions of parse() and deparse()
tidy.source

Reformat R code while preserving blank lines and comments
tidy.gui

A GUI to format R code
unmask.source

Restore the real source code from the masked text
usage

Show the usage of a function
tidy.eval

Evaluate R code and mask the output by a prefix
%InLiNe_IdEnTiFiEr%

A weird operator for internal use only