The function removes duplicated columns, orders the columns as per the order defined by getDataTypeDefinition, optionally removed undefined columns, orders the rows, and finally deletes any data.table keys from the output tables.

formatOutput(
  data,
  dataType,
  keep.all = TRUE,
  allow.missing = FALSE,
  primaryColumnOrder = NULL,
  secondaryColumnOrder = NULL,
  secondaryRowOrder = NULL,
  removeStoXKeys = FALSE
)

Arguments

data

A table or list of tables to return from the StoX function.

dataType

The data type to format against.

keep.all

Logical: If TRUE keep all columns, and if FALSE delete undefined columns.

allow.missing

Logical: If TRUE allow for unrelevant column names defined in secondaryColumnOrder.

primaryColumnOrder

Character: A vector of names of columns that should be placed first regardless of the definition of columns specified in the dataTypeDefinition.

secondaryColumnOrder, secondaryRowOrder

A vector of column names specifying order of column not defined by getDataTypeDefinition used to prioritize when ordering columns and rows, respectively.

removeStoXKeys

Logical: If TRUE remove the key columns, which are those ending with "Key".