DataObject.GetVarNames

Prototypes

void GetVarNames( <int nCharacteristics,> Matrix mVarNames )

Parameters

int nCharacteristics
One or more flags that control which variables' names are retrieved. See Remarks for information about the flags. To specify multiple flags, use the addition operator (+) to add them together. Calling this method without specifying the parameter nCharacteristics is equivalent to calling it with nCharacteristics equal to VC_MATCHANY + VC_ALL.

Matrix mVarNames
Upon return, contains a column vector of the names of the variables.

Remarks

If the parameter nCharacteristics is specified, this method retrieves the names of the variables in the DataObject that have the specified characteristics. If the parameter nCharacteristics is not specified, this method retrieves the names of all the variables in the DataObject.

The parameter nCharacteristics specifies one or more flags that control which variables' names are retrieved. The flags are as follows:

VC_NUMERIC
Only the names of numeric variables are retrieved.

VC_CHARACTER
Only the names of character variables are retrieved.

VC_INTERVAL
Only the names of variables with a measurement level of Interval are retrieved.

VC_NOMINAL
Only the names of variables with a measurement level of Nominal are retrieved.

VC_SELECTED
Only the names of selected variables are retrieved.

VC_ALL
This flag is equivalent to the combination of all the above flags. It is only useful when used together with the flag VC_MATCHANY.

VC_MATCHANY
This flag instructs IML Studio to treat a variable as matching if it has any of the specified characteristics.

VC_MATCHALL
This flag instructs IML Studio to treat a variable as matching only if it has all of the specified characteristics. The behavior of this flag is the default behavior if the parameter nCharacteristics specifies neither VC_MATCHANY nor VC_MATCHALL.

Example
declare DataObject dobj;
dobj = DataObject.CreateFromFile( "baseball" );
dobj.GetVarNames( VC_CHARACTER, x );
print x;
See Also

DataObject.GetSelectedVarNames
DataObject.GetVarName