Usage
writeTabular(table, file = NULL, format = "g", bold = NULL, italic = NULL, mark = NULL, mark.char = "*", na.as = "n/a", align = "l", hrule = NULL, vrule = NULL, bty = c("t", "b", "l", "r"), print.col.names = TRUE, print.row.names = TRUE, digits = 3, wrap.as.table = FALSE, table.position = "h", caption = NULL, caption.position = "b", centering = FALSE, label = NULL)
Arguments
table
A data frame with the information to write
file
Path of a file. If provided, the tabular is wirten in the given file. Otherwise, it is writen to the standard output
format
Format for the numeric values. The accepted formats are those in the function formatC
. The typical values are 'g'
to automatically set the format, 'f'
for a fixed sized floating point format and 'e'
or 'E'
for scientific notation bold
A matrix that matches 'table'
in size indicating with TRUE
those cells that have to be printed in bold font
italic
A matrix that matches 'table'
in size indicating with TRUE
those cells that have to be printed in italic
mark
A matrix that matches 'table'
in size indicating with TRUE
those cells that have to be marked with a superscipt symbol
mark.char
Character to be used to mark cells. Note that the superscript is included in a math environment, so this has to be either a character or a valid math command in LaTeX
na.as
Character to be used to write NA values in the table
align
Character indicating the alignment of the colums ('l'
,'r'
or 'c'
)
hrule
A vector of positions for the horizontal lines in the tabular. All the lines are drawn after the indicated line. When the column names are included, 0 means drawing a line after the column names. The maximum value is the number of rows - 1 (for a line after the last line see parametr bty
)
vrule
Similar to 'hrule'
but for vertical lines. . The maximum value is the number of columns - 1 (for a line after the last columns see parametr bty
)
bty
Vector indicating which borders should be printed. The vector can contain any of subset of c('l','r','t','b')
, which represent, respectively, left, right, top and bottom border. If the parameter is set to NULL
no border is printed.
print.col.names
Logical value indicating whether the column names have to be printed or not
print.row.names
Logical value indicating whether the row names have to be printed or not
digits
A single number or a numeric vector with the number of digits in each column. Its size has to match the number of the final table, i.e., the colums in 'table'
if the row names are not included or the number of columns + 1 if the row names are printed in the final table
wrap.as.table
Logical value indicating whether the latex object has to be wrapped into a table enviroment
table.position
Character indicating the position of the table ('h'
: here, 't'
: top, or 'b'
: botton)
caption
Character string containing the caption of the table. If NULL, no caption is printed
caption.position
Character indicating the possition of the caption (t
: top, the caption is printed over the table; b
: botton, the caption is printed under the table)
centering
Logical value indicating whether the table should be centered in the page
label
Character string containing the label of the table for further references. If NULL, no label is used