Skip to contents

The function executes a chunk of code either in the current working environment or saves the output as an HTML file to be rendered as a part of a web page

Usage

executeCode(code, output = "eval", output.file = NULL)

Arguments

code

code chunk as text, without any decorators or HTML-specific characters.

output

If the output is "eval", the code is executed as is. If the output is "html", the code is not executed.

output.file

If the output is "html", user can provide a file name for the html. If not provided a temporary file will be created.

Value

If the output is "eval": if running the code causes errors, errors are returned. Otherwise NA is returned If output is "html", output file is returned.