eafdiff: Compute empirical attainment function differences

Description Usage Arguments Details Value See Also Examples

View source: R/eaf.R

Description

Calculate the differences between the empirical attainment functions of two data sets.

Usage

1
eafdiff(x, y, intervals = NULL, maximise = c(FALSE, FALSE), rectangles = FALSE)

Arguments

x, y

Data frames corresponding to the input data of left and right sides, respectively. Each data frame has at least three columns, the third one being the set of each point. See also read_datasets().

intervals

(integer(1))
The absolute range of the differences [0, 1] is partitioned into the number of intervals provided.

maximise

(logical() | logical(1))
Whether the objectives must be maximised instead of minimised. Either a single logical value that applies to all objectives or a vector of logical values, with one value per objective.

rectangles

If TRUE, the output is in the form of rectangles of the same color.

Details

This function calculates the differences between the EAFs of two data sets.

Value

With rectangle=FALSE, a data.frame containing points where there is a transition in the value of the EAF differences. With rectangle=TRUE, a matrix where the first 4 columns give the coordinates of two corners of each rectangle and the last column. In both cases, the last column gives the difference in terms of sets in x minus sets in y that attain each point (i.e., negative values are differences in favour y).

See Also

read_datasets(), eafdiffplot()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
A1 <- read_datasets(text='
 3 2
 2 3
 
 2.5 1
 1 2
 
 1 2
')
A2 <- read_datasets(text='
 4 2.5
 3 3
 2.5 3.5
 
 3 3
 2.5 3.5
 
 2 1
')
d <- eafdiff(A1, A2)
str(d)
print(d)

d <- eafdiff(A1, A2, rectangles = TRUE)
str(d)
print(d)

eaf documentation built on May 7, 2021, 5:06 p.m.