5.1 Syntax
To create a long table from a data frame
To create a long table from pipeline
To create a long table from pmtable
5.2 Basics
You can create longtables
that span multiple pages of your pdf document. Tables using thelongtable
environment are very different than the the basic table from stable()
which are built using tabular environment.
5.3 Inserting longtable into your latex document
Once you have written your long table out to a file, you can source it into your latex document with a simple input command
IMPORTANT
- Do not wrap the input in
\begin{table}
/\end{table}
; the table will not show up properly that way - Do not include any
\caption{...}
statement; the caption must be provided in a special way (see below)
5.5 Add a label
To add a label, pass in a caption (either as text or as a macro) and then use the lt_cap_label
argument:
5.6 Include a longtable in an Rmd document
If you want to dump a table into an R markdown document, pass it to st_asis()
. There is a method for stable_long()
and it will wrap the table properly.
5.7 Page breaks
Starting with version 0.4.1, pmtables will modify longtables so that panel headers are kept on the same page as the first row of data underneath the panel row.