This object controls how to execute the code from languages other than R
(when the chunk option
engine is not
'R'). Each component in
this object is a function that takes a list of current chunk options
(including the source code) and returns a character string to be written into
An object of class
list of length 5.
The engine function has one argument
options: the source code of the
current chunk is in
options$code. Usually we can call external
programs to run the code via
system2. Other chunk options are
also contained in this argument, e.g.
In most cases,
options$engine can be directly used in command line to
execute the code, e.g.
ruby, but sometimes we may
want to specify the path of the engine program, in which case we can pass it
engine.path option. For example,
engine.path='/usr/bin/ruby1.9.1'. Additional command line arguments can be
str(knitr::knit_engines$get()) for a list of built-in language
The Leiningen engine
lein requires lein-exec plugin; see
https://github.com/yihui/knitr/issues/1176 for details.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.