Description Usage Arguments Value Author(s) See Also Examples
View source: R/DataPreparation.R
Aggregates a data frame based on a timestamp column to days, weeks, months, quarters, years or total.
1 2 3 4 5 6 7 8 9 |
data |
Data frame or matrix on which the ABC analysis is performed. |
value |
Name(s) of the column variable(s) that contains the values for the ABC and XYZ analysis. |
item |
Names of the columns 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 for the XYZ-analysis. Possible modes are 'day', 'week', 'month', 'quarter', 'year', and 'total'. Total only aggregates by item whereas the other modes aggregate by item an temporal unit. |
fiscal |
consider the start of the business year. Default is set to 1 (January) |
aggregationFun |
Function for aggregating the value column. Default is |
Returns a data frame with the aggregated data with the columns of item, timestamp and sum, which is the sum of the value column.
Leon Binder leon.binder@th-deg.de
Bernhard Bauer bernhard.bauer@th-deg.de
Michael Scholz michael.scholz@th-deg.de
1 2 3 4 5 6 | data('Amount')
aggregatedData = aggregateData(data = Amount,
value = "value",
item = "item",
timestamp = "date",
temporalAggregation = "quarter")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.