
Last chance! 50% off unlimited learning
Sale ends in
Compares the class assignments of two ABC- or two ABC/XYZ analyses.
# S4 method for ABCXYZData,ABCXYZData
compare(
object1,
object2,
valueDiff = NA,
xyzCoefficientDiff = NA,
unequalABC = NA,
unequalXYZ = NA
)
Object of class ABCXYZData
.
Object of class ABCXYZData
.
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.
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.
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.
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.
An ABCYXZComparison
object.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab