DataObject.GetVarData

Prototypes

void GetVarData( Matrix mVarNames <, Matrix mObsNumbers>, Matrix mData )

void GetVarData( String sVarName <, Matrix mObsNumbers>, Matrix mData )

void GetVarData( String[] asVarNames <, Matrix mObsNumbers>, Matrix mData )

Parameters

Matrix mVarNames
A vector containing the names of the variables whose data you want to retrieve.

String sVarName
The name of the variable whose data you want to retrieve.

String[] asVarNames
An array containing the names of the variables whose data you want to retrieve.

Matrix mObsNumbers
A vector containing the observation numbers (1-based) of the observations you want to retrieve. To specify all the observation numbers in the DataObject, use the predefined constant OBS_ALL. Calling this method without specifying mObsNumbers is equivalent to calling it with mObsNumbers equal to OBS_ALL.

Matrix mData
Upon return, contains a matrix in which the columns contain the data for the specified variables.

Remarks

This method retrieves the observation data for variables in the DataObject.

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 );
dobj.GetVarData( "Resp", z );
print z;
See Also

DataObject.GetVarSelectedData
DataObject.GetNumVar
DataObject.GetVarName