DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


RemoveUnmarkedColumns

Declaration: TDataTable.RemoveUnmarkedColumns (FirstCol, LastCol: integer; CSMask: byte): integer;
The method RemoveUnmarkedColumns deletes all columns in the range from FirstCol to LastCol which do not contain any data cell whose cell state (partially) matches the parameter CSMask (i.e. a bitwise AND of the cell state and CSMask is zero). The size of the table is automatically decreased by the number of matched columns.

The function returns the number of deleted columns if everything is OK or -1 if the FirstCol or the LastCol parameter is out of range.

Hint: Setting both FirstCol and LastCol to zero values is a shortcut for setting FirstCol=1 and LastCol=NrOfColumns, i.e. the entire data table is scanned for matching cells if both parameters are set to zero.