Learn R Programming

caracas (version 2.0.0)

tex: Export object to TeX

Description

Export object to TeX

Usage

tex(x, zero_as_dot = FALSE, matstr = NULL, ...)

Arguments

x

A caracas_symbol

zero_as_dot

Print zero as dots

matstr

Replace \begin{matrix} with another environment, e.g. pmatrix. If vector of length two, the second element is an optional argument.

...

Other arguments passed along

Examples

Run this code
if (has_sympy()) {
S <- matrix_sym_symmetric(3, "s")
S[1, 2] <- "1-x"
S
tex(S)
tex(S, matstr = "pmatrix")
tex(S, matstr = c("pmatrix", "r"))
}

Run the code above in your browser using DataLab