latexarray: Make latex array

View source: R/main.R

latexarrayR Documentation

Make latex array

Description

Make latex array

Usage

latexarray(
  M,
  left = "",
  right = "",
  env = "array",
  includenames = TRUE,
  align = NULL,
  lines = TRUE
)

Arguments

M

A matrix

left

left delimiter options: [(|

right

right delimiter options: ])|

env

Array environment

includenames

Include column and row names

align

Column alignment. For a three column matrix, alignment defaults to centering columns("ccc"). If there are row labels, the default would be "r|ccc" to right-align the row labels and separate them with vertical line.

lines

Include lines separating column and row names

Value

character string

Examples

M <- diag(3)
colnames(M) <- LETTERS[1:3]
rownames(M) <- LETTERS[1:3]
latexarray(M)

wjschne/WJSmisc documentation built on June 29, 2023, 8:04 a.m.