Other packages > Find by keyword >

formatR  

Format R Code Automatically
View on CRAN: Click here


Download and install formatR package within the R console
Install from CRAN:
install.packages("formatR")

Install from Github:
library("remotes")
install_github("cran/formatR")

Install by package version:
library("remotes")
install_version("formatR", "1.14")



Attach the package and use:
library("formatR")
Maintained by
Yihui Xie
[Scholar Profile | Author Map]
All associated links for this package
First Published: 2010-03-22
Latest Update: 2023-01-17
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()).
How to cite:
Yihui Xie (2010). formatR: Format R Code Automatically. R package version 1.14, https://cran.r-project.org/web/packages/formatR. Accessed 27 Jun. 2026.
Previous versions and publish date:
0.1-0 (2010-03-22 10:49), 0.1-1 (2010-03-26 12:17), 0.1-2 (2010-04-03 09:59), 0.1-3 (2010-04-11 08:23), 0.1-4 (2010-04-22 08:20), 0.1-5 (2010-12-03 09:32), 0.1-6 (2011-01-06 21:36), 0.1-7 (2011-01-08 19:31), 0.1-8 (2011-01-10 08:46), 0.1-9 (2011-01-16 10:37), 0.2-0 (2011-02-22 09:08), 0.2-1 (2011-03-31 10:56), 0.2-2 (2011-05-20 14:05), 0.2-3 (2011-08-12 07:10), 0.2-4 (2011-09-29 13:28), 0.3-1 (2011-10-02 09:31), 0.3-2 (2011-10-26 20:43), 0.3-3 (2011-11-19 10:56), 0.3-4 (2011-11-21 09:06), 0.4 (2012-04-02 09:22), 0.5 (2012-06-22 07:42), 0.6 (2012-07-13 07:29), 0.7 (2012-12-02 10:09), 0.8 (2013-06-18 07:40), 0.9 (2013-08-05 23:42), 0.10 (2013-10-26 09:48), 1.0 (2014-08-25 00:55), 1.1 (2015-03-29 08:48), 1.2.1 (2015-09-18 08:58), 1.2 (2015-04-21 08:55), 1.3 (2016-03-05 09:20), 1.4 (2016-05-09 17:52), 1.5 (2017-04-26 01:31), 1.6 (2019-03-05 20:00), 1.7 (2019-06-11 22:00), 1.8 (2021-03-12 23:10), 1.9 (2021-04-14 17:30), 1.10 (2021-05-25 17:20), 1.11 (2021-06-01 18:40), 1.12 (2022-03-31 22:20), 1.13 (2022-12-22 07:50)
Other packages that cited formatR R package
View formatR citation profile
Other R packages that formatR depends, imports, suggests or enhances
Complete documentation for formatR
Functions, R codes and Examples using the formatR R package
Some associated functions: tidy_app . tidy_dir . tidy_eval . tidy_pipe . tidy_rstudio . tidy_source . usage . 
Some associated R codes: eval.R . shiny.R . tidy.R . usage.R . utils.R .  Full formatR package functions and examples
Downloads during the last 30 days

Today's Hot Picks in Authors and Packages

assert  
Validate Function Arguments
Lightweight validation tool for checking function arguments and validating data analysis scripts. T ...
Download / Learn more Package Citations See dependency  
r2resize  
In-Text Resize for Images, Tables and Fancy Resize Containers in 'shiny', 'rmarkdown' and 'quarto' Documents
Automatic resizing toolbar for containers, images and tables. Various resizable or expandable contai ...
Download / Learn more Package Citations See dependency  
PeakSegOptimal  
Optimal Segmentation Subject to Up-Down Constraints
Computes optimal changepoint models using the Poisson likelihood for non-negative count data, subj ...
Download / Learn more Package Citations See dependency  
AzureKeyVault  
Key and Secret Management in 'Azure'
Manage keys, certificates, secrets, and storage accounts in Microsoft's 'Key Vault' service: ...
Download / Learn more Package Citations See dependency  
AHSurv  
Flexible Parametric Accelerated Hazards Models
Flexible parametric Accelerated Hazards (AH) regression models in overall and relative survival fram ...
Download / Learn more Package Citations See dependency  

27,535

R Packages

236,180

Dependencies

73,487

Author Associations

27,536

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA