DataObject.SetVarData

Prototypes

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

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

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

Parameters

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

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

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

Matrix mObsNumbers
A vector containing the observation numbers (1-based) of the observations you want to change.

Matrix mData
A matrix in which the columns contain the new observation data for the specified variables. If mObsNumbers is specified, mData[i,] corresponds to observation number mObsNumbers[i]. If mObsNumbers is not specified, mData[i,] corresponds to observation number i.

Remarks

This method changes 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 );
obsnums = { 3 4 };
changes = { 5 3 };
dobj.SetVarData( "Resp", obsnums, changes );
DataTable.Create( dobj ).ActivateWindow();