The Add Columns Table menu item allows users to add columns in four different ways:
- New empty columns,
- Column transformation,
- Column summarization,
- Column calculation.
All four methods are covered here. It can be accessed by going to: Table | Columns | Add Columns.
Input Data Requirements
This works on Table objects, including Design Tables and Annotation tables.
Step 1: Select source table
The user will first be asked to choose the table to which columns should be added:
Step 2: Choose Column Source
The user is then presented with the "Choose Column Source" window, during which user can decide in which way the new column will be added:
Option 1: Add new columns
For adding new columns, the user can choose the number of columns to add, a column prefix (which will be the column name if only adding one column, or enumerated if adding multiple columns), the Column type (Factor, Numeric, Integer, Logical, and Character), and where to add the column in the table.
Option 2: Add column by transformation
The user can generate a new column by performing a transformation on the selected numeric column in the table:
- Adding a constant: Add the specified value to each element
- Multiplying by a constant: Multiply the specified value to each element
- Censor if value < a specified value: Set the cell to this value if the source cell is less than the specified value
- Censor if value is > than a specified value: Set the cell to this value if the source cell is greater than the specified value
- The user can also perform an arithmetic operation using another column (Divide, Divided by, Multiply, 'Add, Subtract, and Subtracted by)
- Transformation method: A transformation method can be specified for the output. Available options are described in the [ Transformation Table].
Option 3: Add column by summarization
For column summarization, the user can choose a number of Summarization Methods that can be performed on any numeric columns as listed below:
Option 4: Add column by calculation
For column calculation, the user can build an arithmetic expression by choosing a column on the left, clicking "Insert Column" button, then select the calculation method from the Method window, click "Insert Method". The user can then continue to add calculations and columns to build the full expression.
A new column will be added to the original table, as a new column, or from transformation, summarization, or calculation.
Given the following table:
Adding columns by the four methods can result in additional columns like this: