IBM 15 Switch User Manual


 
133
CLEM Language Reference
Functions Reference
The following CLEM functions a r e available for working with da ta in IBM® SPSS® Modeler.
You can enter these functions as code in a variety of dialog boxes, such as Derive and Set To
Flag nodes, or you can use the Expression Builder to create valid CLEM expressions without
memorizing function list s or eld names.
Function Type Description
Information
Used to gain insight into eld values. F or example, the fu nction
is_string returns true for all records whose type is a string.
Conversion
Used to construct new elds or conver t storage type. For example,
the function to_timestamp converts the selected eld to a timestamp.
Comparison
Used to compare eld valu es to each other or to a specied string.
For example, <= is used to compare whether the values of two elds
are lesser or equal.
Logical
Used to perform logical operations, such as if, then, else operations.
Numeric
Used to perform numeric calculations, such as the natural log of
eld values.
Trigonometric
Used to perform trigonometri
c calculations, such as the arccosine
of a specied angle.
Probability
Return probabilities based on various distributions, such as
probability that a value from Student’s t dis t ribution will be less
than a specic value.
Bitwise Used to manipulate integers as bit patterns.
Random Used to randomly select items or generate numbers.
String
Used to perform a wi de v ariety of operations on strings, such as
stripchar, which allows you to remove a specied chara ct er.
SoundEx
Used to nd strings when the precise spelling is not known; based on
phonetic assumptions about how certain letters are pronounced.
Date and time
Used to perform a variety of operations on date, time, and timestamp
elds.
Sequence
Used to gain insight into the record sequence of a data set or perform
operations based on that sequence.
Global
Used to access global values created by a Set Globals node. For
example, @MEAN is used to
refer to the mean average of all values
for a eld across the entire data set.
Blanks and null
Used to access, ag, and frequently ll user-specied blanks or
system-miss i ng values. For example, @BLANK(FIELD) is used to
raise a true ag for rec ords where blanks are pres ent.
Special elds
Used to denote the speci c elds under examination. For example,
@FIELD is used when deriving multiple elds.
Conventions in Function Descriptions
The f ollowing conventions are used througho ut this guide when referring to items in a func tion.
Convention Description
BOOL A Boolean, or ag, s uch as true or false.
NUM, NUM1, NUM2 Any number.
REAL, REAL1, REAL2
Any real number, such as 1.234 or –77.01.