r_over(C;S;A;X)

Returns the result of evaluating the expression X for each value in the specified columns. (Available as of version 15.21)

Function type

Vector only

Syntax

r_over(C;S;A;X)

Input

Argument Type Description
C any A space- or comma-separated list of column names

C may also be a string expression (in single quotes) constituting a pattern for matching columns. For instance, 'foo*' specifies all columns that begin with "foo".

If C is omitted, the values in all of the columns are included.

Note: The columns specified by C must be either all numeric (integer and decimal) or all text.
S integer A boolean column or an expression in rcv_/rcn_/rct_ which determines whether or not that column is selected to be included in the calculation. See System variables for more information about rcv_/rcn_/rct_.

If S is omitted, all columns will be considered by the function (subject to any prior column selections).

A any If you use the special variable rca_ in the X argument, A is the initializing argument of rca_.
X any
X is an expression that is used to transform the value or name of each of the selected columns.
Note: Use the system variables rcv_, rcn_, and rct_ to reference the column value, name, and type, respectively. X may also reference the special variable rca_, which takes on, for each column in succession, the result of the evaluation at the previous column processed for that row.

Return Value

For each row of the table, r_over calculates the expression X for the columns selected in C.

Example

For example, r_over(;rct_='f';0.0;rca_+rcv_^2) is the sum of squares of all floating-point columns in the table.