Produces a latex longtable

Share:

Description

Produces a latex longtable

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
lTab(x, label = NULL, caption.firsthead = NULL, caption.head = NULL,
  caption.foot = NULL, caption.lastfoot = NULL,
  booktabs = .op("kLat.lTab.booktabs", "kLat.booktabs", FALSE),
  toprule = .book("kLat.toprule", booktabs, "\\toprule", "\\hline"),
  bottomrule = .book("kLat.bottomrule", booktabs, "\\bottomrule",
  "\\hline"), midrule = .book("kLat.midrule", booktabs, "\\midrule",
  "\\hline"), align = .op("kLat.lTab.align", "kLat.align", "center"),
  envir = getOption("kLat.lTab.envir", "longtable"),
  colsep = .op("kLat.lTab.colsep", "kLat.colsep", ""), coldef = .coldef(x,
  colsep), rowsep = .op("kLat.lTab.rowsep", "kLat.rowsep", ""),
  rows = .op("kLat.lTab.rows", "kLat.rows", FALSE), head = .header(x, rows),
  firsthead = NULL, foot = bottomrule, lastfoot = NULL)

Arguments

x

a data.frame or matrix to form the base of the table

label

set the table's label, defaults to an empty string

caption.firsthead,caption.head,caption.foot,caption.lastfoot

paces the caption in the firsthead, head, foot, or lastfoot respectively. It is important not to set a caption in an otherwise NULL section (although an empty string is acceptable) or strange bugs can occur. It is accaptable if the section was set by default as in head and foot. Consult the longtable documentation for a more detailed explanation of these options.

booktabs

logical value, if not set will use value of kLat.(xTab|sTab|lTab).booktabs, if not set will use value of kLat.booktabs, if not set defaults to FALSE. When TRUE toprule defaults to '\toprule', midrule to '\midrule', and botrule to '\bottomrule', when FALSE those values all default to '\hline'. Has no effect when toprule, midrule, and botrule are individually set.

toprule

sets the value for the top rule, if not set will be determined by the value of booktabs

bottomrule

sets the value for the bottom rule, if not set will be determined by the value of booktabs

midrule

sets the value for the mid rule, if not set will be determined by the value of booktabs

align

set the alignment of the environment, if not set will use value of kLat.(xTab|sTab|lTab).align, if not will use value of kLat.align, if not set defaults to 'center'

envir

set the environment for the table, if not set will use the value of kLat.(xTab|sTab|lTab).envir, if not set defaults to 'tabular', 'supertabular', and 'longtable' for xTab, sTab, and lTab respectively

colsep

separator to be used between columns (i.e. '|'), if not set will use the value of kLat.(xTab|sTab|lTab).colsep, if not set will use the value of kLat.colsep, if not set defaults to an empty string. If coldef is set this value is ignored and the separators must be specificed in the coldef

coldef

sets column definition i.e. \begin{tabular}{'align'}, if not set defaults to numeric = right, character = left

rowsep

the separaotr to be used between rows (i.e. '\hline'), if not set will use the value of kLat.(xTab|sTab|lTab).rowsep, if not set will use the value of kLat.rowsep, if not set defaults to an empty string

rows

logical value to determine if rownames are included in table, if not set will use the value of kLat.(xTab|sTab|lTab).rows, if not set will use the value of kLat.rows, if not set defaults to FALSE, if TRUE the column name for the rownames column defaults to an empty string

head

sets the value for the table header, defaults to the column names; if you set this be sure to end with '\\\\'

firsthead

header on first page of table only; defaults to header; if you set this, you are responsible for setting any \hline, \toprule, or \midrule lines

foot

sets value of the table footer, defaults to the value of botrule

lastfoot

footer on last page of table only

caption

the caption for the table, unlinke xTab and sTab, there is no caption.top or caption.bottom option in longtable

Examples

1