DataObject.Create

Prototypes

static DataObject Create( String sName <, Matrix mValues> )

static DataObject Create( String sName, Matrix mValues <, boolean bNominal> )

static DataObject Create( String sName, Matrix mVarNames, Matrix mValues <, boolean bNominal> )

static DataObject Create( String sName, Matrix mVarNames, Matrix mVarLabels, Matrix mValues <, boolean bNominal> )

static DataObject Create( String sName, Matrix mVarNames, Matrix mVarLabels, Matrix mValues <, Matrix mNominal> )

Return Value

The return value is a reference to the newly created object of the DataObject class.

Parameters

String sName
The name to assign to the DataObject.

Matrix mVarNames
A vector that specifies the names to assign to the variables in the DataObject. The string mVarNames[i] specifies the name of the variable whose initial data comes from mValues[,i]. Each string must be a valid SAS variable name. If the mVarNames parameter is not specified, the variables are named "A1", "A2", "A3", etc.

Matrix mVarLabels
A vector that specifies the labels to assign to the variables in the DataObject. A variable's label describes the variable. The string mVarLabels[i] specifies the label of the variable whose name is mVarNames[i]. If the mVarLabels parameter is not specified, each variable is assigned a label that is the same as its name.

Matrix mValues
A matrix that contains the initial data for the DataObject. The data in this matrix are copied into the newly created DataObject. After the Create method returns, there is no connection between the mValues matrix and the DataObject.

boolean bNominal
If mValues contains exclusively nominal data, set bNominal to true. If mData contains exclusively interval data, set bNominal to false.

Matrix mNominal
A vector that specifies whether each column in mValues contains interval or nominal data. Set mNominal[i] to zero if the column vector mValues[,i] contains interval data. Set mNominal[i] to a nonzero value if the column vector mValues[,i] contains nominal data.

Remarks

This method creates an object of the DataObject class. If neither bNominal nor mNominal is specified, mValues is assumed to contain exclusively interval data.

Example
mData = { 20 165,
          30 170, 
          40 175, 
          50 180, 
          60 170, 
          70 160 };
mVarNames = { "Age", "Weight" };
declare DataObject dobj;
dobj = DataObject.Create( "Sample Data", mVarNames, mData, false );
DataTable.Create( dobj ).ActivateWindow();
See Also

DataObject.CreateFromExcelFile
DataObject.CreateFromFile
DataObject.CreateFromOtherServerDataSet
DataObject.CreateFromServerDataSet