Styling API

Functions for styling code

style_text()

Style a string

style_file()

Style .R, .Rmd or .Rnw files

style_pkg()

Prettify R source code

style_dir()

Prettify arbitrary R code

styler_addins

Stylers for RStudio Addins

Fine-tune styling

Customize style guildes

create_style_guide()

Create a style guide

specify_math_token_spacing() tidyverse_math_token_spacing()

Specify spacing around math tokens

specify_reindention() tidyverse_reindention()

Specify what is re-indented how

Non-functional documentation

Explaining features

caching

Remember the past to be quicker in the future

stylerignore

Turn off styling for parts of the code

styler-package

Non-invasive pretty printing of R code

Caching

Utilities to help manage the styler cache

cache_activate() cache_deactivate()

Activate or deactivate the styler cache

cache_clear()

Clear the cache

cache_info()

Show information about the styler cache

Other

print(<vertical>)

Print styled code