user manual
111
Building CLEM Expressions
Characters—Always use sing le backquotes like this ` . Fo r example, note the character d in
the function stripchar(`d`,"drugA"). The only exception to this is when you a r e using an integer
to refer to a sp
ecific character in a string. F or example, note the characte r 5 in the function
lowertoupper("druga"(5)) —> "A". Note: On a standard U.K. and U.S. keyboard, the key for the
backquote character ( gra ve accent, Unicode 0060) can b e found just below the Esc key.
Fields—Fields are typicall y unquote d when used in CLEM expressions (subscr(2,arrayID))
—> CHAR). You
can u se single quotes when necess ary to enclose spaces or other special
characters ('Order Number'). Fields that are quoted but undefined in the data set will be
misread as strings.
Parameters—Always use single quotes ('$P-threshold').
Expressions and Conditions
CLEM expressions c an return a result (used when deriving new values)—for examp le:
Weight * 2.2
Age + 1
sqrt(Signal-Echo)
Or, they c an evaluate true or false (used when selecting on a condition)—for example:
Drug = "drugA"
Age < 16
not(PowerFlux) and Power > 2000
You can combine o perators and f unctions arbitrarily in CLEM expres sions—for ex
ample:
sqrt(abs(Signal)) * max(T1, T2) + Baseline
Bracke ts and operator precedence determine the order in which the expressi on is evaluated. In this
example, the order of evalua tion is:
abs(Signal) is evaluated, and sqrt is applied to its result.
max(T1, T2) is evaluated.
The two results are multiplied: x has higher precedence than +.
Finally, Baseline is added to the result.
The descending order of precedence (that is, oper ations that are performed first to op erations
that are performed last) is as follows:
Functi on arguments
Functi on calls
xx
x / mod div rem
+ –
> < >= <= /== == = /=