maxima.engine | R Documentation |
knitr
maxima engineFunctions to process Maxima code chunks by knitr
.
maxima.engine(options)
maxima.inline(command)
options |
named |
command |
character string containing the Maxima command to be executed. |
Upon attachment, i.e. library(rim)
function maxima.engine
is registered as a knitr
engine. Thus, maxima.engine()
is called by knit()
to evaluate Maxima code chunks. When called upon the first code chunk of a document it starts Maxima in a separate process in server mode. This means that a single Maxima session is used for all Maxima code chunks of an RMarkdown
document. Inputs and outputs can thus be used across chunks (e.g. by using Maxima reference labels). maxima.options(engine.format = ..., engine.label = ...)
configures the output format and whether or not output reference labels should be printed.
The purpose of maxima.inline
is to insert Maxima results as inline text, i.e. on the same line of the preceding text, if it is actually written on the same line of the RMarkdown
file. It uses the same running Maxima process as maxima.engine
. The output format for inline results can be configured separately from the settings of maxima.engine
, i.e. maxima.options(inline.format = ..., inline.label = ...)
.
This functions prints the resulting output from maxima together with it's code
character string containing the maxima result printed according options set by maxima.options(inline.format = ..., inline.label = ...)
.
maxima.inline()
: This function can be used to insert maxima outputs as inline.
if (maxima.isInstalled()) {
maxima.inline("2+2;")
maxima.stop(engine = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.