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

Script Command Data

Script Command: Data

The keyword Data is a reference to the data matrix of DataLab and allows to access particular parts of the matrix by appending a dot and one of the following sub-keywords: ELEM, COLNAME, ROWNAME, STATE, and CLASS.
Data.Elem[cn,rn]=value Sets the data value of the matrix cell at position [cn,rn]. cn and rn are the column and row indices, respectively. The value parameter may be any allowed value (depends on the level of measurement of the variable).
Data.ColName[cn]=name Sets the name of the column cn to the string name.
Data.RowName[rn]=name Sets the name of the row rn to the string name.
Data.State[cn,rn]=keywords Sets the cell at the position [cn,rn] to a state specified by the parameter keywords. cn and rn are the column and row indices, respectively. The keywords parameter may be any combination of MARKA, MARKB, EMPTY, and RESET, separated by a '+' sign. Please note that the keyword RESET overrides all other keywords and restores the default state of the cell.
Data.Class[rn]=cnum Sets the class number of the row rn to the value cnum. cnum may take values between 0 and 255.

Hint: Any of the rn and cn parameters may be replaced by a star (*) in order to affect an entire row or column (or the whole data matrix if both are replaced by stars).


fills all cells of the third column with the value 2.99

marks all cells of the fourth row as type A and B

Data.ColName[5]=Apples or Nuts
sets the variable name of column 5 to "Apples or Nuts"

Last Update: 2012-Sep-03