formatOutput: Function to format the output of a function returning StoX...

View source: R/Definitions.R

formatOutputR Documentation

Function to format the output of a function returning StoX data (ModelData or ProcessData).

Description

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.

Usage

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

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.

secondaryColumnOrder, secondaryRowOrder

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


StoXProject/RstoxBase documentation built on July 14, 2024, 9:39 a.m.