Learn R Programming

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

formatR (version 0.10)

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

98,110

Version

0.10

License

GPL

Maintainer

Yihui Xie

Last Published

October 26th, 2013

Functions in formatR (0.10)

tidy.source

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

Format the R scripts under a directory
tidy.eval

Evaluate R code and mask the output by a prefix
usage

Show the usage of a function
tidy.gui

A GUI to format R code