compile_r: Compile an R file into a JavaScript file

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

input

A character string; the input file.

output

A character string; the output file. When the output is "", the result is printed to the standard output.

rules

A list of rewriting rules. See make_rule for more detail.

deparsers

A 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)


sketch documentation built on Oct. 23, 2022, 5:07 p.m.