Constructs a new VariableCollection object from a DataTable.
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Sub New ( _ dataTable As DataTable _ ) |
| C# |
|---|
public VariableCollection ( DataTable dataTable ) |
| C++ |
|---|
public: VariableCollection ( DataTable^ dataTable ) |
Parameters
- dataTable (System.Data.DataTable)
- A DataTable that contains the data that is to be loaded into the collection.
Remarks
The columns of the table are converted into variables according to the following rules:
- If the column contains unique values (the DataColumn's Unique property is true), then the column is interpreted as a KeyVariable.
- If the column's data type is numerical, the column is interpreted as a NumericalVariable.
- If the column's data type is a date or time value, the column is interpreted as a DateTimeVariable.
- Otherwise, the column is interpreted as a CategoricalVariable.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | dataTable is nullNothingnullptr. |