Learn R Programming

parseLatex (version 0.4.1)

tablecalcs: Calculations on tables

Description

Calculations on tables

Usage

tableNrow(table)

tableNcol(table)

tableDim(table)

Value

tableNrow() returns the number of rows in the table.

tableNcol() returns the number of columns in the table.

tableDim() returns the number of rows and columns in the table.

Arguments

table

A known tabular-like environment object.

Examples

Run this code
latex <- kableExtra::kbl(mtcars[1:2, 1:3], format = "latex")
parsed <- parseLatex(latex)
table <- parsed[[find_tabular(parsed)]]
table
tableNrow(table)
tableNcol(table)
tableDim(table)

Run the code above in your browser using DataLab