styler formats your code according to the tidyverse style guide (or your custom style guide) so you can direct your attention to the content of your code. It helps to keep the coding style consistent across projects and facilitate collaboration. You can access styler through
- the RStudio Addin as demonstrated below
- R functions like
- various other tools described in
You can install the package from CRAN.
Or get the development version from GitHub:
# install.packages("remotes") remotes::install_github("r-lib/styler")
The following online docs are available: