Description Usage Arguments Value References Examples
View source: R/TimeVariation.R
Detects items whose value (stock, demand, etc.) has changed over time in contrast to other items. This analysis is based on the Macnaughton-Smith et al. clustering algorithm.
1 2 3 4 5 6 7 8 9 10 |
data |
Data frame that will be expanded. |
value |
Name of the column variable that contains the value for the ABC and XYZ analysis. |
item |
Name of the column including the item names or identifiers (e.g., product name, EAN) |
timestamp |
Name of the column including the timestamp. This column should be in POSIX or Date-format. |
temporalAggregation |
Temporal aggregation mode (i.e., "day", "week", "month", "quarter", "year"). |
aggregationFun |
Function for aggregating the value column. Default is sum. |
preProcess |
A string vector that defines a pre-processing of the aggregated data before clustering. Available pre-processing methods are "center", "scale", "standardize", and "normalize". Default is NA (no pre-processing). |
recentTimePeriods |
Integer indicating the number of time periods that are used to define the recent item values. Default is 5. |
Returns a data frame showing to which cluster each item belongs based on all value and based on the recent values as well as whether the item has switched the cluster.
Macnaughton-Smith, P., Williams, W.T., Dale, M.B., Mockett, L.G. (1964) "Dissimilarity Analysis: a new Technique of Hierarchical Sub-division", Nature, 202, 1034–1035.
1 2 3 4 5 6 | data("Amount")
timeVariations = detectTimeVariations(data = Amount,
value = "amount",
item = "item",
timestamp = "date",
temporalAggregation = "week")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.