hanaml.IQR.Rdhanaml.IQR is a R wrapper for SAP HANA PAL Inter-Quartile Range.
hanaml.IQR(data, key, col = NULL, multiplier = NULL)
| data |
|
|---|---|
| key |
|
| col |
|
| multiplier |
|
Returns a list of DataFrame:
DataFrame 1
Test results, structured as follows:
ID column, with same name and type as data's ID column.
IS_OUT_OF_RANGE column, type INTEGER, containing the test results from the IQR test that determine whether each data sample is in the range or not: 0 indicates a value is in the range and 1 indicates a value is out of range.
DataFrame 2
Including Upper-bound and Lower-bound from the IQR test, structured
as follows:
STAT_NAME, type NVARCHAR(256), statistics name.
STAT_VALUE, type DOUBLE, statistics value.
Given a series of numeric data, the inter-quartile range (IQR) is the difference between the third quartile (Q3) and the first quartile (Q1) of the data.
Input DataFrame data:
> data$Collect()
ID VAL
1 P1 10
2 P2 11
3 P3 10
...
12 P12 11
13 P13 12
14 P14 13
15 P15 12
Call the function:
> result <- hanaml.IQR(data, key="ID", multiplier = 1.5)
Output:
> result[[1]]$Collect()
ID IS_OUT_OF_RANGE
1 P1 0
2 P2 0
3 P3 0
......
12 P12 0
13 P13 0
14 P14 0
15 P15 0