Learn R Programming

parseLatex (version 0.4.1)

tables: Functions related to parsing LaTeX tables

Description

Functions related to parsing LaTeX tables

Usage

is_tabular(item)

find_tabular(items, start = 1)

Value

is_tabular() returns boolean indicating if this is a tabular-like environment.

find_tabular() returns the index of the first tabular-like environment, or NA if none is found.

Arguments

item

An item from a LaTeX2 list object.

items

A LaTeX2 list object.

start

Where to start looking.

Examples

Run this code
latex <- kableExtra::kbl(mtcars[1:2, 1:2], format = "latex")
parsed <- parseLatex(latex)
is_tabular(parsed[[2]])


find_tabular(parsed)
table <- parsed[[find_tabular(parsed)]]
table

Run the code above in your browser using DataLab