Skip to content

This function generates a list of column names for a specified table, optionally prefixing them with the table name. It is designed to handle cases where no column names are provided, in which case it simply returns NULL. The function also removes the "_occurrence" and "_exposure" suffixes from the table name before prefixing, ensuring a cleaner column name output.

Usage

generateTableColumns(tableName, columnNames)

Arguments

tableName

A character string specifying the name of the table.

columnNames

An optional vector of column names to include in the operation.

Value

A vector of column names, optionally prefixed with the modified table name. If no column names are provided, the function returns NULL.