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



Format of Script Files

Script files have the default extension .ISC. The commands of a script file follow the syntax definition below:

General guidelines:

  • 1 line per command (except of the commands ARIADNE and MATH)
  • parameters in parentheses
  • elements of a chart are addressed by separating dots (much like OOPS Pascal syntax)
  • values are assigned by '=' sign
  • comments must start with a semicolon as the first character of the line

Available commands:

Command Description
Ariadne (align, size)....
/Ariadne
Displays simple HTML text between the keywords Ariadne and /Ariadne in a separate Ariadne window. Note that the Ariadne keywords have to be stored in separate lines. The Ariadne system is a script controlled help system to guide users when entering DataLab using a DataLab script.

The format of the Ariadne window can be adjusted by the parameters align and size. align defines the alignment of the window (allowed values: LEFT, RIGHT, TOP, and BOTTOM). size specifies the width or the height of the Ariadne window in pixels.

Hint: The Ariadne help text may contain button icons to point the user to a particular button.

Chart [cnum] This is not a command but a reference to chart number cnum. Properties of the chart may be accessed by appending the name of the property separated by a dot.
Chart[cnum].DataColor=value The color of the data.
Chart[cnum].ScaleColor=value The color of the scales and axis inscriptions
Chart[cnum].BackGndColor=value The background color
Chart[cnum].FillColor=value The fill color of the chart window
Chart[cnum].Width=value The width of the chart window.
Chart[cnum].Height=value The height of the chart window.
Chart[cnum].Left=value The position of the left rim of the chart window.
Chart[cnum].Top=value The position of the top rim of the chart window.
Chart[cnum].Mode=value The mode of the chart could be either LINES, POINTS, SPECTRUM, or CLFLINES. The mode POINTS accepts an additional parameter (1..25) which defines the type of the marks.
Chart[cnum].KindOfChart=value The type of the chart. The following values may be assigned to it: COLIDX, COLCOL, ROWIDX, ROWROW, HISTOGRAM, PROBPLOT, CUMUDIST. Each diagram type can be further characterized by specifying more details in round parantheses. If no details are specified, the last settings are used.
Chart[cnum].XAxis=axnum Index of the row/column which is used for the x-axis of a plot. The specification of axnum may not be valid for all charts.
Chart[cnum].YAxis=axnum Index of the row/column which is used for the y-axis of a plot. The specification of axnum may not be valid for all charts.
Chart[cnum].Axis=axnum Index of the row/column of the default axis
CloseAllCharts Closes all visible charts. Matrix view is not affected.
CorrelFunc (f1, f2, vis1, vis2, visScat) The command CorrelFunc brings up the correlation function window using the features f1 and f2 as the selected variables. The flags vis1, vis2, and visScat (true or false) determine which of the charts is visible (the first variable, the second variable, and the scatter plot besides the correlation function).
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 measurement scale 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).

Examples:

Data.Elem[3,*]=2.99 fills all cells of the third column with the value 2.99
Data.State[*,4]=MARKA+MARKB 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"
DefaultWinSize (dx,dy) Sets the default size of the chart windows. This size is used by the command WinArrange. The parameters dx and dy specify the width and the height of the windows.
Fill (ulx,uly,lrx,lry,fillvalue) Fills the range [ulx,uly] ... [lrx,lry] of the data matrix by the value fillvalue.
ImportASCFile (FileName) Imports the data file specified by FileName. If the filename does not contain any path information, DataLab tries to find the file in the directory where the script has been loaded from. If the file cannot be found there the work directory is searched for. Finally, if the file is not contained in the work directory an error message is displayed. The format of the data file has to comply with the ASC format specification.
Initialize This command resets DataLab to a defined state. All diagram will be closed and the data matrix will be erased. The size of the data matrix is set to 5 columns and 100 rows.
LoadIDTFile (Filename) If the filename does not contain any path information, DataLab tries to find the file in the directory where the script has been loaded from. If the file cannot be found there the work directory is searched for. Finally, if the file is not contained in the work directory an error message is displayed. Load a data file stored in IDT format.
MarkData (ulx,uly,lrx,lry,mt) Marks all data in the range [ulx,uly] ... [lrx,lry] using the marking type mt. The parameters ulx, and uly specify the cell coordinates of the upper left cell of the cell range to be marked, the parameters lrx and lry specify the lower right cell of this area. The parameter mt may assume the values 'A', 'B', or 'AB', and defines the type marks to be applied.

Example:

Markdata (1,1,2,5,A) marks the cells [1,1] to [2,5] as type A.
Math.../Math Die keywords MATH and /MATH identify a section containing mathematical formulas. This section must not contain any other script commands.
MinVers (vnum) Specifies the minimum release number vnum required to run this script. If DataLab is older than the specified version then the script issues a warning message. vnum has to be specified as floating point number with 3 decimal places.
MLRCalc Enters the MLR calculation window. This command brings up a modal window. Thus it blocks all the following script commands until it is closed again.
NewChart (cnum) Creates and displays an empty chart using chart number cnum. If a chart with number cnum already exists, NewChart has no effect at all. The parameter cnum may be omitted. In this case a chart with the first available number is created.
Resize (NrCols, NrRows) Resize the data matrix. The parameters NrCols and NrRows define the new size of the matrix.
Rot3D (c1, c2, c3) Displays the 3D rotation window using the variables c1, c2, and c3.
ScaleCols (SclType, VarList) Scaling of selected columns. The parameter SclType controls the type of the applied scaling, the parameter VarList specifies the affected columns. SclType may assume the following values: meancenter, standardize, sum=AAA, max=AAA, range(AAA:BBB); AAA and BBB are numeric values.
The parameter VarList contains the list of columns which are to be scaled. The column numbers have to be separated by commas, contiguous ranges of columns may be specified by "v:w" (v is the first, w the last column number of the range).

Examples:

ScaleCols (standardize, 3, 7:9) standardizes the columns 3,7,8, and 9
ScaleCols (sum=100, 1:10) scales the columns 1 to 10, so that the sum of all values in a column equals 100
ScaleCols (range(-1:1),2,3,10) scales the columns 2, 3 and 10, so that the values in each column span a range between -1 and +1.
ScaleRows (SclType, VarList) Scaling of selected rows. The parameter SclType controls the type of the applied scaling, the parameter VarList specifies the affected rows. SclType may assume the following values: meancenter, standardize, sum=AAA, max=AAA, range(AAA:BBB); AAA and BBB are numeric values.
The parameter VarList contains the list of rows which are to be scaled. The column numbers have to be separated by commas, contiguous ranges of rows may be specified by "v:w" (v is the first, w the last column number of the range).

Examples:

ScaleRows (meancenter, 1:3, 7:9) mean-centers the rows 1, 2, 3, 7, 8, and 9
ScaleRows (max=50, 3,7,9) scales the rows 3, 7 and 9, so that the maximum absolute value in a row equals 50
Sort (Dir, SortCrit, ulx,uly,lrx,lry) Sorts the data matrix according to the specified parameters. Dir defines the direction of sort (valid values asc (ascending) and desc (descending)), SortCrit specifies the sort criterion (valid values are cx (column number, e.g. "c6"), rx (row number, e.g. "r2"), class, colname and rowname), and ulx, uly, lrx, lry control the sorting range. The parameters ulx and uly specify the cell coordinates of the upper left cell of the sorting range, the parameters lrx and lry the lower right cell of this range. In order to sort the entire range of columns or rows, the corresponding parameters may be set to -1. The sort criterion will always be sorted, even if it is not part of the sorting range. The row and column names are also always sorted (depending on the sort criterion).

Examples:

Sort (asc, c1, -1,-1,-1,-1) sorts the entire matrix so that the values in the first column are arranged in ascending order.
Sort (desc, c6, 1,-1,3,-1) sorts the columns 1,2,3, and 6 so that the column 6 is arranged in descending order of its values (the sorting range contains all cells of the columns 1 to 3; column 6, which is the sort criterion, is sorted as well.
Sort (asc, rowname, 1,-1,1,-1) sorts the first column of the matrix so that the row names are arranged in ascending alphabetic order.
Summary: text The comment text is displayed in the file dialog when selecting the script file.
StatTests Opens the statistical tests form
UnmarkData (ulx,uly,lrx,rxy,mt) Unmarks all data in the range [ulx,uly] ... [lrx,lry] using the marking type mt. The parameters ulx, and uly specify the cell coordinates of the upper left cell of the cell range to be marked, the parameters lrx and lry specify the lower right cell of this area. The parameter mt may assume the values 'A', 'B', or 'AB', and defines the type marks which are to be removed.

Example:

Unmarkdata (1,1,2,5,B) removes all marks of type B from the cells [1,1] to [2,5].
WinArrange Tiles windows on screen
ZoomNorm (cnum) Sets the range of the chart cnum to display all available data


Last Update: 2011-Dez-08