eafs {eaf}R Documentation

Exact computation of the EAF

Description

This function computes the EAF given a set of points and a vector set that indicates to which set each point belongs.

Usage

eafs(points, sets, groups = NULL, percentiles = NULL)

Arguments

points

Either a matrix or a data frame of numerical values, where each row gives the coordinates of a point.

sets

A vector indicating which set each point belongs to.

groups

Indicates that the EAF must be computed separately for data belonging to different groups.

percentiles

The percentiles of the EAF of each side that will be plotted as attainment surfaces. NA does not plot any. See eafplot.default.

Value

A data frame (data.frame) containing the exact representation of EAF. The last column gives the percentile that corresponds to each point. If groups is not NULL, then an additional column indicates to which group the point belongs.

Note

There are several examples of data sets in file.path(system.file(package="eaf"),"extdata").

Author(s)

Manuel López-Ibáñez

See Also

read.data.sets

Examples


eaf.path <- system.file(package="eaf")

x <- read.data.sets(file.path(eaf.path, "extdata","example1_dat"))
# Compute full EAF
eafs(x[,1:2], x[,3])

# Compute only best, median and worst
eafs(x[,1:2], x[,3], percentiles = c(0, 50, 100))

x <- read.data.sets(file.path(eaf.path,"extdata","spherical-250-10-3d.txt"))
y <- read.data.sets(file.path(eaf.path,"extdata","uniform-250-10-3d.txt"))
x <- data.frame(x, group = "spherical")
x <- rbind(x, data.frame(y, group = "uniform"))

# Compute only median separately for each group
eafs(x[,1:3], sets = x[,4], groups = x[,5], percentiles = 50)


[Package eaf version 1.8 Index]