knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of {styler.mlr} is format code according to the mlr style. It is an example for a custom {styler} style guide.
You can install the released version of {styler.mlr} from GitHub with:
remotes::install_github("mlr-org/styler.mlr")
This is a basic example of how to style code with it.
library(styler.mlr) cache_deactivate() text = "x <- 4 y = 3 a; " style_text(text)
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()") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.