Description Usage Arguments Examples
Convert a data.frame object into a LaTeX table.
1 2 3 4 5 6 7 8 | listTable(fileName, longtable = TRUE, landscape = FALSE,
caption = "", fontSize = "small", dataframe,
zebraPattern = "none", by = names(dataframe)[1],
orderGroups = FALSE, colNames = names(dataframe),
vars = names(dataframe), fixedColVars = c(),
fixedColWdths = c(), markVar = "", markVarVal = "",
toLatexChar = TRUE, appendix = TRUE, subsection = NULL,
marker = NULL, append = FALSE)
|
fileName |
character. A description of the file connection. |
longtable |
logical. Toggle ‘longtable’ or ‘table’ environment. Defaults to ‘TRUE’. |
landscape |
logical. Use ‘landscape’ environment. Defaults to ‘FALSE’. |
caption |
character. Main table caption. |
fontSize |
character. Define font size from one of the following: ‘tiny’, ‘scriptsize’, ‘footnotesize’, ‘small’, ‘normalsize’, ‘large’, ‘Large’, ‘LARGE’, ‘huge’, ‘Huge’. Default is ‘small’. |
dataframe |
data.frame. Provides content for list table. |
zebraPattern |
character. Defaults to ‘none’, other options are ‘plain’, ‘group’ and ‘plaingroup.’ ‘plaingroup’ is only recommended for large groups (more than four objects in a group). |
by |
character. Column used to generate zebra pattern, defaulting to the first column in ‘dataframe’. |
orderGroups |
logical. If ‘TRUE’ order the data by ‘by’. This is recommened when ‘zebraPattern’ is set to ‘group’ or ‘plaingroup’. |
colNames |
character vector. Define column name headers for ‘dataframe’. |
vars |
character vector. Column names to select from ‘dataframe’. |
fixedColVars |
character vector. Column variables. |
fixedColWdths |
character vector. Fixed width for each column. |
markVar |
character vector. Marker variable. |
markVarVal |
character vector. Value for each marker variable. |
toLatexChar |
logical. If ‘TRUE’ text will be checked and escaped should they contain special LaTeX characters. |
appendix |
logical. If ‘TRUE’ the function
will require the |
subsection |
character. Name of document subsection that refers to this table. |
marker |
character. Marker for document subsection that refers to this table. |
append |
logical. If ‘TRUE’ output will be appended instead of overwritten. |
1 2 3 | listTable(fileName='', caption="\\label{table:listtable}Table of groupings", zebraPattern='group',
dataframe=data.frame(code=c('(a)', '(b)', '(c)'), def=c("apple, orange", "dog, cat, horse", "windows, linux, mac")),
appendix=FALSE) # print generated table to standard out
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.