Provides R bindings to the deterministic, rule-based formatter from 'arity'. Format R source text or individual files using a style based on the tidyverse R style guide.
arity provides R bindings to the formatter behind
arity. The package embeds the published
arity-formatter Rust crate; it does
not invoke the arity command-line interface.
Format source held in memory:
library(arity)
format_text("x<-(1+2)*3^4\n")
## [1] "x <- (1 + 2) * 3^4\n"
Or format one file in place:
changed <- format_file("R/example.R")