compare,ABCXYZData,ABCXYZData-method {matman}R Documentation

Compares the results of two ABC/XYZ analyses

Description

Compares the class assignments of two ABC- or two ABC/XYZ analyses.

Usage

## S4 method for signature 'ABCXYZData,ABCXYZData'
compare(
  object1,
  object2,
  valueDiff = NA,
  xyzCoefficientDiff = NA,
  unequalABC = NA,
  unequalXYZ = NA
)

Arguments

object1

Object of class ABCXYZData.

object2

Object of class ABCXYZData.

valueDiff

Only items with a difference of the column value larger than valueDiff between the first and second ABC-XYZ-Analysis are returned. In the comparison data.frame a new column is added for the difference in the value columns.

xyzCoefficientDiff

Only items with a difference of the column xyzCoefficient larger than the xyzCoefficientDiff between the first and second ABC-XYZ-Analysis are returned. In the comparison data.frame a new column is added for the difference in the xyzCoefficient columns.

unequalABC

If TRUE only items are returned, where the ABC-Classes are different. If FALSE only items are returned, where the ABC-Classes are equal. If NA, no further restriction takes place based on the column ABC.

unequalXYZ

If TRUE only items are returned, where the XYZ-Classes are different. If FALSE only items are returned, where the XYZ-Classes are equal. If NA, no further restriction takes place based on the column XYZ.

Value

An ABCYXZComparison object.

Author(s)

Leon Binder leon.binder@th-deg.de

Bernhard Bauer bernhard.bauer@th-deg.de

Michael Scholz michael.scholz@th-deg.de

See Also

ABCXYZComparison

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)

[Package matman version 1.1.3 Index]