Skip to content

{styler} mlr style guide

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

mlr-org/styler.mlr

Repository files navigation

styler.mlr

Lifecycle: experimental R-CMD-check

The goal of {styler.mlr} is format code according to the mlr style. It is an example for a custom {styler} style guide.

Installation

You can install the released version of {styler.mlr} from GitHub with:

remotes::install_github("mlr-org/styler.mlr")

Example

This is a basic example of how to style code with it.

library(styler.mlr)
cache_deactivate()
#> Deactivated cache.
text = "x <- 4
y = 3
a;
"

style_text(text)
#> x = 4
#> y = 3
#> a

To use the mlr-style in the RStudio addin, one can put something like this into .Rprofile:

if (grepl("mlr", getwd()) || grepl("paradox", getwd())) {
  options(styler.addins_style_transformer = "styler.mlr::mlr_style()")
}

About

{styler} mlr style guide

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages