Learn R Programming

formatR (version 1.14)

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

94,955

Version

1.14

License

GPL

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

January 17th, 2023

Functions in formatR (1.14)

tidy_app

A Shiny app to format R code
tidy_dir

Format all R scripts under a directory, or specified R scripts
tidy_pipe

Substitute the magrittr pipe with R's native pipe operator
tidy_source

Reformat R code
tidy_rstudio

Reformat R code in RStudio IDE
tidy_eval

Insert output to source code
usage

Show the usage of a function