A systematic approach to LaTeX tables

tisch allows to convert R data frames into LaTeX tables. Presently, tisch provides three advantages over other packages with similiar ambition:

  1. Intricate table designs: When the data hierarchical order in the rows and columns
  2. Consistent API: tisch provides a succinct DSL for generating tables and manipulating table elements
  3. Theme-based: Theme elements can be

Installation

Get the development version from Github: \Sexpr{devtools::install_github("crubba/tisch")}

Using tisch: An example

We illustrate the generation of a tisch table with the french_fries data set from the reshape2 package:

library(tisch)
data("browsershares")

tt <- tisch(browsershares, rows = c("year", "month"), sep = " >> ") +
  theme(
    row_style = ragged(indent = 0.4)
  ) + 
  caption("Browser market share in 2011-2013") +
  footnote("Note: Information taken from StatCounter. StatCounter reports desktop and mobile browser share separately; we report them together. For consistency, each desktop browser share has been reduced by multiplying it by the current overall desktop share versus mobile. Similarly, mobile browser shares have each been multiplied by the overall mobile percentage")

to_tex(tt)

This code gives us the following output:

tisch-output

More detailed information on tisch can be learned from the package vignette.

Disclaimer

tisch is in a very early development stage. Part of the API are likely to change in future versions.



crubba/tisch documentation built on May 14, 2019, 12:06 p.m.