Creates and adds a new column (data series) to the table.
If `data` is provided, the number of rows (length of `data`) must be identical to the number of rows already in the table. If `data` is not provided, the returned series will have the same number of rows as the table with default-initialized values. If there are no rows in the table and `data` is provided, this will initialize the number of rows in the table to the length of `data`.
Declaration Syntax
public virtual IDataSeries CreateAndAddColumn(VariableType variableType, VariableClassification variableClassification, IEnumerable data, string unit, string name)
Parameters
- variableType(VariableType)
The
of the new column.
- variableClassification(VariableClassification)
The
of the new column.
- data(IEnumerable)
The values, if any, for the new column. If `null`, a default value of
will be used.
- unit(string)
The unit of the data. If `null`, a default unit will be selected for the specified
- name(string)
The name of the new column. If `null`, a unique name will be generated from the specified