ABCXYZComparison-class {matman} | R Documentation |
Class ABCXYZComparison
Description
This S4 class represents the result of a comparison of two ABC/XYZ analysis results.
Slots
data
(data.frame) The comparison result as data.frame.
type
(character) The type of the analysis that has been performed. This is either 'abc' or 'abcxyz'.
valueDiff
(numeric) The difference between the value of an item in ABC/XYZ analysis A and the value of the same item in ABC/XYZ analysis B that is required to consider the item in the comparison.
xyzCoefficientDiff
(numeric) The difference between the xyz coefficient of an item in ABC/XYZ analysis A and the xyz coefficient of the same item in ABC/XYZ analysis B that is required to consider the item in the comparison.
unequalABC
(logical) If
TRUE
only items are returned, where the ABC-Classes are different. If FALSE only items are returned, where the ABC-Classes are equal. IfNA
, no further restriction takes place based on the column ABC.unequalXYZ
(logical) If
TRUE
only items are returned, where the XYZ-Classes are different. If FALSE only items are returned, where the XYZ-Classes are equal. IfNA
, no further restriction takes place based on the column XYZ.
Objects from the Class
Objects can be created by calling the function
compare
function. This S4 class represents the result of a comparison of two
ABC/XYZ analysis results.
Author(s)
Leon Binder leon.binder@th-deg.de
Bernhard Bauer bernhard.bauer@th-deg.de
Michael Scholz michael.scholz@th-deg.de
Examples
data("Amount")
data1 = Amount[sample(1:nrow(Amount), 1000),]
data2 = Amount[sample(1:nrow(Amount), 1000),]
abcxyzData1 = computeABCXYZAnalysis(data1, value = "value", item = "item", timestamp = "date",
temporalAggregation = "day", XY = 0.5, YZ = 1)
abcxyzData2 = computeABCXYZAnalysis(data2, value = "value", item = "item", timestamp = "date",
temporalAggregation = "day", XY = 0.5, YZ = 1)
comparison = compare(abcxyzData1, abcxyzData2)
comparison