Learn R Programming

textab: Create Highly-Customized LaTeX Tables in R

Created by Thibaut Lamadon and Bradley Setzler

The textab package produces highly-customized LaTeX tables in R.

There are only three functions in this package:

  • TexRow: Form a row in a LaTeX tabular environment.
  • TexSave: Save the tabular as a .tex file, and optionally compile it as a PDF.
  • TexMidrule: Insert a midrule, or list of partial midrules, between rows in a LaTeX tabular environment.

This package builds LaTeX tables in blocks, in the spirit of ggplot2, using the + and / operators for concatenation.

  • plus sign (+): Stack rows vertically (forming multiple rows).
  • slash sign (/): Combine rows side-by-side (forming a wider row).

To install the package from CRAN:

install.packages("textab")

To install the package from Github:

devtools::install_github("setzler/textab")

To use the package after it is installed:

library(textab)

To get started, read the following articles:

Copy Link

Version

Install

install.packages('textab')

Monthly Downloads

177

Version

1.0.1

License

MIT + file LICENSE

Maintainer

Bradley Setzler

Last Published

April 25th, 2023

Functions in textab (1.0.1)

TexRow

This function creates a row of a LaTeX table.
/.tt_

Concatenate textab blocks horizontally (side-by-side).
TexSave

Compile a tabular object to a pdf file
TexMidrule

Create one (or many) partial midrule(s).
print.tt_block

Print a textab block as a LaTeX tabular.
+.tt_

Concatenate textab blocks vertically.