tergo
tergo
?There is plenty of formatting libraries for R. Just to name a few:
Unfortunately, all of them suffer from one major drawback. They are
slow. If you care about speed and efficiency of your styling tool, and
not so much about the full-blown configurability, you should use
tergo
. Some use-cases include:
tergo
instead of slow running alternatives. Save tens of
hours on your monthly bill!tergo
is Faster than Blink of an Eye.
First run is more x100 faster or for bigger
repositories even x1000 faster than other available
solutions.
Yes, tergo is there but it takes less than 0.1 seconds so is not visible!!!
Benchmarking code is available in data-raw/bench.R
on
Github.
Requires Rust tooling:
rustup
cargo
if (!require(remotes)) {
install.packages("remotes")
}::install_github("kpagacz/tergo@latest", subdir = "antidotum/tergo") remotes
Does not require Rust tooling, because R-Universe builds binaries.
install.packages('tergo', repos = c('https://kpagacz.r-universe.dev', 'https://cloud.r-project.org'))
See the R manual for the reference.
To style your package, run:
::style() tergo
tergo
reads the configuration from a TOML file
(tergo.toml
) in your package root. See the
library documentation for possible values and their explanation.
The styling functions accept a configuration argument that lets you modify the styling behaviour without a configuration file.
The keys and the possible values are the same as in the TOML file. See the library documentation for possible values and their explanation.