xt_print | R Documentation |
Prints xtable with longtable features
xt_print(
df,
caption = "",
label = "",
size = "normalsize",
cont = "Cont. ...",
tabular.environment = "longtable",
include.rownames = FALSE,
align = NULL,
floating = FALSE,
floating.environment = "table",
digits = NULL,
hlines.after = c(-1, 0, nrow(df)),
type = "latex",
...
)
df |
data frame being printed |
caption |
table caption. Default is ”. |
label |
table label. Default is ”. |
size |
latex font size to be used. Default is 'normalsize' |
cont |
longtable continuation string. Default is 'Cont. ...'. |
tabular.environment |
print.xtable tabular.environment. Default is 'longtable'. |
include.rownames |
logical. If TRUE the rows names is printed. Default value is TRUE. |
align |
Character vector of length equal to the number of columns of the resulting table, indicating the alignment of the corresponding columns. Default is NULL Also, "|" may be used to produce vertical lines between columns in LaTeX tables, but these are effectively ignored when considering the required length of the supplied vector. If a character vector of length one is supplied, it is split as strsplit(align, "")[[1]] before processing. Since the row names are printed in the first column, the length of align is one greater than ncol(x) if x is a data.frame. Use "l", "r", and "c" to denote left, right, and center alignment, respectively. Use "p3cm" etc. for a LaTeX column of the specified width. For HTML output the "p" alignment is interpreted as "l", ignoring the width request. |
floating |
If TRUE and type="latex", the resulting table will be a floating table (using, for example, \begintable and \endtable). See floating.environment below. Default value is TRUE. |
floating.environment |
If floating=TRUE and type="latex", the resulting table uses the specified floating environment. Possible values include "table", "table*", and other floating environments defined in LaTeX packages. Default value is "table". |
digits |
Numeric vector of length equal to one (in which case it will be replicated as necessary) or to the number of columns of the resulting table or matrix of the same size as the resulting table indicating the number of digits to display in the corresponding columns. Since the row names are printed in the first column, the length of the vector digits or the number of columns of the matrix digits is one greater than ncol(x) if x is a data.frame. Default depends of class of x. If values of digits are negative, the corresponding values of x are displayed in scientific format with abs(digits) digits. |
hlines.after |
When type="latex", a vector of numbers between -1 and "nrow(x)", inclusive, indicating the rows after which a horizontal line should appear. If NULL is used no lines are produced. Default value is c(-1,0,nrow(x)) which means draw a line before and after the columns names and at the end of the table. Repeated values are allowed. |
type |
character vector of length one representing the type of table to produce. Possible values for type are "latex" or "html". Default value is "latex". |
... |
extra arguments to print() |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.