DataTable.Create

Prototypes

static DataTable Create( DataObject dobj <, boolean bShow> )

static DataTable Create( String sDataName, Matrix mData <, boolean bShow> )

Return Value

The return value is a reference to the newly created DataTable object.

Parameters

DataObject dobj
The DataObject containing the data you want to view.

boolean bShow
If bShow is true, the table's window is displayed. If bShow is false, the table's window is hidden. Calling this method without specifying bShow is equivalent to calling it with bShow equal to true.

String sDataName
The name to assign to the DataObject created internally by this method.

Matrix mData
The matrix containing the data you want to view. This matrix is used to create a DataObject and then that DataObject is used to create a DataTable.

Remarks

This method creates a tabular view of data. Each variable in the DataObject becomes a column in the table and each observation becomes a row. The methods that create a DataTable from a matrix internally create a DataObject before creating the DataTable.

Example
x = { 1 2 3 4 5 6 7 8 };
y = { 2 1 4 5 6 5 6 9 };
declare DataObject dobj = DataObject.Create( "Sample Data" );
dobj.AddVar( "Pred", "Predictor", x );
dobj.AddVar( "Resp", "Response", y );
DataTable.Create( dobj ).ActivateWindow();
See Also

DataObject.Create