knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Building blocks for TeX tables
Assemble LaTeX tabular environments using simple operations.
This would enable us to create any table layout with a consistent user API.
Defining a new class of R element tabular that is the basic structure of the language.
Defining a new class of R element tb that is the basic structure of the language.
Let t1 and t2 be two objects of class tb.
| | |
|:--:|:--:|
| t1 + t2 |r '\u2b1b' r '\u2b1b'|
| | |
|:--:|:--:|
||r '\u2b1b'|
|t1 / t2||
||r '\u2b1b'|
Using this language creating a table can be broken down to cell level
t1 =(``r '\u2b1b'`` + ``r '\u2b1b'`` + ``r '\u2b1b'``) / (``r '\u2b1b'`` + ``r '\u2b1b'`` + ``r '\u2b1b'``)
would be translated to
1 & 2 & 3 \\ 4 & 5 & 6
making their combination a natural extension
t1 + t1
would translate to
1 & 2 & 3 & 1 & 2 & 3 \\ 4 & 5 & 6 & 1 & 2 & 3
A set of aesthetic elements can be defined to control the table and cell level attributes, eg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.