Nothing
latex2r to latexr. The public API is unchanged:
the main functions are still latex2r() and latex2fun(), and errors are still
raised as conditions of class latex2r.error.\bar{x} and \overline{x} translate to mean(x), and
\tilde{x} translates to median(x).\sum_{k}^{}{x} translates to data.table::frollsum(x, k).
The exponent group after ^ is parsed for notation compatibility but ignored.latex2r() and latex2fun() gained an na.rm argument. When
TRUE, calls to mean() and median() are emitted with na.rm = TRUE
(frollsum() is not affected since it handles missing values differently).
The default FALSE keeps the output unchanged.latex2r() now normalizes the characters commonly emitted by
visual formula editors (MathQuill) and plain keyboard input before scanning.
Minus signs, ×, ⋅, ÷, Greek letters, and accented vowels such as ā, ã
and â become the equivalent LaTeX commands. The new normalize_mathquill()
function is exported so the mapping can be inspected and reused.latex2ast() function that returns the parsed abstract syntax tree of a
formula instead of its R translation, for debugging and tooling.\ln{x} translates to log(x) (alias of \log).\left|x\right| translates to abs(x).\;, \,, \:, \quad, \qquad) are now ignored
instead of raising "Unrecognized latex character".\sum_{3}^{2}{x}y).stop_custom() conditions not inheriting from class "error", which made
errors raised by latex2r() impossible to catch with tryCatch(error = ...) and
aborted non-interactive sessions. tryCatch(..., class = "latex2r.error") and
expect_error(class = "latex2r.error") now work as documented.} in \sqrt{x}}); it now raises a latex2r.error.latex2fun() no longer mistakes named call arguments for assignments, so
formulas translating to log(x, base = 2) (or using na.rm = TRUE) work.Token R6 class now has a print.Token S3 method. Useful for debugging.NEWS.md file to track changes to the package.latex2fun() utils were updated so now, for example, any letter can be a function argument.
In general the process of transforming a latex expression to a function is more robust.pi is not detected as function argument anymore.latex2fun() raises an error if there is an assignment within the expression.latexInput() and launch_app(). Thus, the package does not need either
shiny or mathquill anymore.Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.