MyNixOS website logo
Description

Translate R Expressions to 'MathML' and 'LaTeX'/'MathJax'.

Translate R expressions to 'MathML' or 'MathJax'/'LaTeX' so that they can be rendered in 'R Markdown' documents and shiny apps. This package depends on R package 'rolog', which requires an installation of the 'SWI-Prolog' runtime either from 'swi-prolog.org' or from R package 'rswipl'.

mathml. Translate R expressions to MathML

mathml allows rendering R terms in pretty mathematical equations, bridging the gap between computational needs, presentation of results, and their reproducibility.

Researchers or teachers can already use R Markdown to conduct analyses and show results, mathml smoothes this process and allows for integrated calculations and output. The package mathml can help in fact to improve data analyses and statistical reports from an aesthetical perspective, as well as regarding reproducibility of research, by allowing also for a better detection of possible mistakes in R programs.

The package supports both MathML and Latex/MathJax for use in R Markdown documents, presentations and Shiny Apps.

License

This R package is distributed under a BSD-2 simplified license (see the file LICENSE).

Installation

  1. Download and install a recent R from https://www.r-project.org/

  2. Download and install a recent RStudio from https://www.rstudio.com/

  3. R> install.packages("mathml")

The package depends on R package rolog [https://cran.r-project.org/package=rolog], which itself needs the SWI-Prolog runtime on the system. The latter can be installed either from [https://swi-prolog.org] or by installing R package rswipl [https://cran.r-project.org/package=rswipl].

Example

library(mathml)
term <- quote(a^b + c * (d + 3) - a^2L * (a + d))
mathout(term)

$a^b + c \cdot (d+3.00) - a^2 \cdot (a+d)$

Metadata

Version

1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows