Convert dataframe to IQRoutputTable object and allow export

This function allows to export a data.frame as a table with optional title and footer information. Export is done if a filename is provided. If the compliance mode is on (.COMPLIANCE_MODE is set to TRUE) then this function also generates a compliance log file (only if filename is provided). The name of the generated compliance log file is the same name as the text file name but with appended ".log". The function also returns an IQRoutputTable object that essentially is a list with xtable, xtitle, and xfooter entries. If compliance model is enabled, the IQRoutputTable object will also be stored as an RDS file, allowing subsequent further processing.

IQRoutputTable(
  xtable = NULL,
  xfooter = NULL,
  xtitle = NULL,
  object = NULL,
  filename = NULL,
  report = NULL,
  na.string = NULL,
  FLAGreplaceRoundBracketsHeader = TRUE,
  verbose = NULL
)

Arguments

xtable

Table to be exported as dataframe

xfooter

Character vector of length 1 or >1. If multiple elements are provided, they are pasted with a newline character as separator.

xtitle

Character with table title text

object

IQRoutputTable object. If defined, xtable is not used but xfooter, xtitle and report (if defined) will be set in the object, overwriting old content

filename

String with filename (can include path)

report

TRUE: add reporting tags FALSE: do not add (for scfreen output only) NULL: same as TRUE if xtable provided.

na.string

Character string to replace NA entries by. Defaults to NULL.

FLAGreplaceRoundBracketsHeader

If TRUE then "(" and ")" in table headers will be replaced by "[" and "[". If FALSE, then no such replacement is done. Needed for compatibility with IQReport on Linux.

verbose

Logical, should the output be returned to the console. This argument is only effective when filename is provided.

Value

IQRoutputTable object. This object can be converted to text using the function text_IQRoutputTable().

See also