Learn R Programming

tergo (version 0.1.9)

style_file: Style a file

Description

Style a file

Usage

style_file(file, configuration = list())

Value

(logical) whether the file was formatted successfully or skipped. TRUE - formatted successfully, FALSE - skipped.

Arguments

file

(character) path to the file to format.

configuration

(list) Configuration for formatting. Default list().

Details

To see possible configuration options, see get_default_config().

Examples

Run this code
tmp <- tempfile()
file_conn <- file(tmp)
writeLines(c("function(){}", "A<-7"), file_conn)
close(file_conn)
style_file(file = tmp, configuration = list())
unlink(tmp)

Run the code above in your browser using DataLab