Skip to contents

This function encapsulates a excel output file as a destination for data tables. With the output of this function you can add extra data to the supplement as a new sheet, or you can write the spreadsheet to disk. When each data table is written either the table can be written silently or returned so that it is included in a knitr document. This is controlled by option("hide.supplementary.tables"=TRUE).

Usage

data_supplement(
  ...,
  filename = "supplementary-material.xlsx",
  out = ggrrr::outputter(...),
  nameGlue = "Supplementary Table {index}"
)

Arguments

...

Named arguments passed on to .outputter

directory

the root of the output

...

not used must be empty

datedFile

do you want the filename to have the date appended?

datedSubdirectory

do you want the files to be placed in a dated subdirectory?

filename

the xlsx filename

out

an outputter (defaults to a default outputter )

nameGlue

What will the tables be named

Value

a list of 2 functions. $add_table(hux, caption, footnote, index), which takes a huxtable, caption, and index a writes the huxtable into a supplementary. $write() which writes the collection of tables to the excel file.