Custom table for sa4ss
table_format(
x,
format = "latex",
caption = "Add Caption",
label = NULL,
digits = getOption("digits"),
booktabs = TRUE,
col_names = NULL,
linesep = "",
longtable = TRUE,
font_size = 10,
align = "c",
col_names_align = "c",
hold_position = TRUE,
escape = TRUE,
bold_header = FALSE,
landscape = FALSE,
repeat_header = FALSE,
header_grouping = NULL,
format.args = NULL,
custom_width = FALSE,
col_to_adjust = NULL,
width = NULL,
create_png = FALSE,
...
)
An R object, typically a matrix or data frame.
As defined by kableExtra::kbl()
. Default for sa4ss is 'latex'.
As defined by kableExtra::kbl()
.
As defined by kableExtra::kbl()
.
As defined by kableExtra::kbl()
.
As defined by kableExtra::kbl()
. Logical.
Names for the columns to show on table.
As defined by kableExtra::kbl()
.
As defined by kableExtra::kbl()
.
Font size in pts. If NULL, document font size is used.
As defined by kableExtra::kbl()
.
As defined in kableExtra::linebreak()
.
As defined in kableExtra::kable_styling()
. Logical.
As defined by kableExtra::kable_styling()
.
Make headers bold. Logical
Make this table in landscape orientation?
If landscape, repeat the header on subsequent pages?
As defined by kableExtra::kable_styling()
As defined by kableExtra::kbl()
.
Logical. Allow for custom column widths
Vector of columns to adjust width. Only used if custom_width = TRUE.
Vector or single value of column widths (i.e. c('2cm', '2cm')) for the columns defined in the col_to_adjust.
Logical. If set to true tables will be created as png objects in the doc.
Extra arguments supplied to kbl
.
table_format(head(iris))
#> Need to define label to reference table.
#> \begingroup\fontsize{10}{12}\selectfont
#> \begingroup\fontsize{10}{12}\selectfont
#>
#> \begin{longtable}[t]{c>{\centering\arraybackslash}p{1.6cm}>{\centering\arraybackslash}p{1.6cm}>{\centering\arraybackslash}p{1.6cm}>{\centering\arraybackslash}p{1.6cm}}
#> \caption{Add Caption}\\
#> \toprule
#> Sepal.Length & Sepal.Width & Petal.Length & Petal.Width & Species\\
#> \midrule
#> \endfirsthead
#> \caption[]{Add Caption (\textit{continued)}}\\
#> \toprule
#> Sepal.Length & Sepal.Width & Petal.Length & Petal.Width & Species\\
#> \midrule
#> \endhead
#>
#> \endfoot
#> \bottomrule
#> \endlastfoot
#> 5.1 & 3.5 & 1.4 & 0.2 & setosa\\
#> 4.9 & 3.0 & 1.4 & 0.2 & setosa\\
#> 4.7 & 3.2 & 1.3 & 0.2 & setosa\\
#> 4.6 & 3.1 & 1.5 & 0.2 & setosa\\
#> 5.0 & 3.6 & 1.4 & 0.2 & setosa\\
#> 5.4 & 3.9 & 1.7 & 0.4 & setosa\\*
#> \end{longtable}
#> \endgroup{}
#> \endgroup{}