Skip to main content

compile_r

compile_rR Documentation

Compile an R file into a JavaScript file#

Description#

Compile an R file into a JavaScript file

Usage#

compile_r(
input,
output = "",
rules = default_rules(),
deparsers = default_deparsers()
)

Arguments#

inputA character string; the input file.
outputA character string; the output file. When the output is "", the result is printed to the standard output.
rulesA list of rewriting rules. See make_rule for more detail.
deparsersA list of deparsers. See make_deparser for more detail.

Value#

A character string; the output file path.

Examples#

file <- system.file("test_files/test_source.R", package = "sketch")
readLines(file)
compile_r(input = file)