array_to_latex: Convert an R array into LaTeX for easy writing in Rmarkdown

View source: R/array_to_latex.R

array_to_latexR Documentation

Convert an R array into LaTeX for easy writing in Rmarkdown

Description

Convert an R array into LaTeX for easy writing in Rmarkdown

Usage

array_to_latex(A, fraction = TRUE)

Arguments

A

An array to convert to Latex format

fraction

An option of whether to print the result as a decimal or fracion

Value

A string that can be put into an Rmarkdown document by using cat() to direct the output

Examples

latex_string <- array_to_latex(matrix(1:6, 3, 2))

# within Rmarkdown chunk
# cat(latex_string)

jtipton25/dasc2594 documentation built on Oct. 7, 2022, 3:46 p.m.