as_latex.Mashed_table: Convert a Mashed Table to Latex Code

as_latex.Mashed_tableR Documentation

Convert a Mashed Table to Latex Code

Description

Convert a Mashed Table to Latex Code

Usage

## S3 method for class 'Mashed_table'
as_latex(
  x,
  mash_method = attr(x, "mash_method"),
  id_vars = attr(x, "id_vars"),
  insert_blank_row = attr(x, "insert_blank_row"),
  sep_height = attr(x, "sep_height"),
  ...,
  kable_options = default_kable_options()
)

Arguments

x

a Tatoo_table, data.frame or a list of data.frames

mash_method

either "row" or "col". Should the tables be mashed together with alternating rows or with alternating columns?

id_vars

Only if mashing columns: one ore more colnames of the tables to be mashed. If supplied, columns of both input tables are combined with merge(), otherwise cbind() is used.

insert_blank_row

Only if mashing rows: logical. Whether to insert blank rows between mash-groups. Warning: this converts all columns to character. Use with care.

sep_height

Only has an effect when exporting to xlsx. if insert_blank_row == TRUE, height of the inserted row, else height of the top row of each mash-group.

...

mash_table() only: data.frames with the same row and column count. Elements of (...) can be named, but the name must differ from the argument names of this function.

kable_options

list. Options passed on to knitr::kable(). See default_kable_options() for details.

Value

as_latex()returns a character scalar of Latex code

save_pdf() returns a the path to the saved file as character scalar.

view_pdf() returns NULL (invisibly)

See Also

Other as_latex methods: as_latex.Composite_table(), as_latex.Tagged_table(), as_latex.Tatoo_report(), as_latex.data.frame(), as_latex()


tatoo documentation built on March 31, 2023, 8:16 p.m.