Language Reference

TABLEISVARNUMERIC Function

TABLEISVARNUMERIC (table <, cols>) ;

This function is supported by the IML procedure and the iml action.

The TableIsVarNumeric function returns a binary row vector that indicates whether the specified columns are numeric. The value 1 indicates a numeric variable; the value 0 indicates that a variable is not numeric.

The function takes the following input arguments:

table

specifies an existing table.

cols

specifies the columns of the table. The cols argument can be a numeric vector of column numbers (such as {2 4 7}) or a character vector of names (such as {"X" "Y"}). If this argument is omitted, a binary vector is returned that indicates whether each variable is numeric.

The following statements indicate whether the Sex and Height variables are numeric. Figure 463 shows that the Sex variable is not numeric and the Height variable is numeric.

tbl = TableCreateFromDataSet("Sashelp", "Class");
colNames = {"Sex" "Height"};
isNumeric = TableIsVarNumeric(tbl, colNames);
print isNumeric[c=colNames];

Figure 463: Numeric and Character Columns

isNumeric
SexHeight
01


Last updated: May 07, 2026