Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

transform_code

Transform code from R, Rmd or Rnw files


Description

A wrapper which initiates the styling of either R, Rmd or Rnw files by passing the relevant transformer function for each case.

Usage

transform_code(path, fun, ..., dry)

Arguments

path

A vector with file paths to transform.

fun

A function that returns a character vector.

...

Further arguments passed to transform_utf8().

dry

To indicate whether styler should run in dry mode, i.e. refrain from writing back to files ."on" and "fail" both don't write back, the latter returns an error if the input code is not identical to the result of styling. "off", the default, writes back if the input and output of styling are not identical.


styler

Non-Invasive Pretty Printing of R Code

v1.4.1
MIT + file LICENSE
Authors
Kirill Müller [aut], Lorenz Walthert [cre, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.