hanaml.ABC.Rd
hanaml.ABC is an R wrapper for SAP HANA PAL ABC analysis.
hanaml.ABC(
data,
key = NULL,
col = NULL,
percent.a,
percent.b,
percent.c,
thread.ratio = NULL
)
DataFrame
DataFrame containting the data.
character, optional
Name of the ID column.
Defaults to the first column if not provided.
character, optional
Name of the measurement column.
If not provided, it defaults the first non-ID
column of data.
double
Specifies the interval for A class
double
Specifies the interval for B class
double
Specifies the interval for C class
double, optional
Controls the proportion of available threads that can be used by this
function.
The value range is from 0 to 1, where 0 indicates a single thread,
and 1 indicates all available threads.
Values between 0 and 1 will use up to
that percentage of available threads.Values outside this
range are ignored.
Defaults to 0.
DataFrame
, structured as follows:
ABC_CLASS: ABC class.
ID: record ID (correspond to input table).
ABC analysis is a method that ranks the importance of different items based on a particular measurement (such as revenue or profit). Based on the measurement, items are then grouped in three different classes. The items in the A-class are the most valuable, while the items in the C-class are the least valuable. An example of ABC classification is as follows:
"A" items: 20 % of the items (customers) accounts for 70
"B" items: 30 % of the items (customers) accounts for 20
"C" items: 50 % of the items (customers) accounts for 10
> data$Collect()
ITEM VALUE
1 item1 15.40
2 item2 200.40
3 item3 280.40
4 item4 100.90
5 item5 40.40
6 item6 25.60
7 item7 18.40
8 item8 10.50
9 item9 96.15
10 item10 9.40
Call the function:
> result <- hanaml.ABC(data = data, percent.a = 0.7,
percent.b = 0.2, percent.c = 0.1, thread.ratio = 0.5)
Results:
> result$Collect()
ABC_CLASS ITEM
1 A item3
2 A item2
3 A item4
4 B item9
5 B item5
6 B item6
7 C item7
8 C item1
9 C item8
10 C item10