min and min2 functions
The min and min2 functions are intended to retrieve the minimum value of an attribute.
The min function retrieves the minimum value of an attribute, while
The min2 function compares two attributes and retrieves the minimum value between them. (we suggest you not to use this function, it only allows compatibility with processes coming from previous Rulex versions (4 and backwards)
Function and parameters
min(column, group)
min2(column1, column2)
Be careful when using these functions, because the parameters written into brackets look the same, as they are two attributes, but it is essential to add the 2 to the function if we want to compare two values.
Min function parameters
Parameter | Description |
---|---|
column | It identifies the column to which you want to apply the formula. Multiple attributes can be specified, as long as they’re enclosed in double brackets. The column parameter is mandatory. |
group | It allows you to group the results by a certain column. |
Min2 function parameters
Parameter | Description |
---|---|
column1 | It identifies the column to which you want to apply the formula. The column 1 parameter is mandatory. |
column2 | It identifies the column to which you want to apply the formula. The column2 parameter is mandatory. |
Example - min
The following example uses the Students Performance dataset.
Description | Screenshot |
---|---|
| |
| |
When the column value is a list enclosed in double brackets, the formula considers the single rows of the attributes, so it calculates the minimum considering the chosen attributes in rows. The formula will be: The results can be read as follows:
|
Example - min2
The following example uses the Students Performance dataset.
Description | Screenshot |
---|---|
and so on. The same operation can be performed with the min function. The min2 function allows compatibility with processes coming from previous Rulex versions. |