get_frontier {KraljicMatrix} | R Documentation |
Compute the Pareto Optimal Frontier
Description
Extract the points that make up the Pareto frontier from a set of data.
Usage
get_frontier(data, x, y, quadrant = c("top.right", "bottom.right",
"bottom.left", "top.left"), decreasing = TRUE)
Arguments
data |
A data frame. |
x |
A numeric vector. |
y |
A numeric vector. |
quadrant |
Chararacter string specifying which quadrant the frontier
should appear in. Default is |
decreasing |
Logical value indicating whether the data returned is in
decreasing or ascending order (ordered by |
Value
A data frame containing the data points that make up the efficient frontier.
See Also
geom_frontier
for plotting the Pareto front
Examples
# default will find the Pareto optimal observations in top right quadrant
get_frontier(mtcars, mpg, wt)
# the output can be in descending or ascending order
get_frontier(mtcars, mpg, wt, decreasing = FALSE)
# use quadrant parameter to change how you define the efficient frontier
get_frontier(airquality, Ozone, Temp, quadrant = 'top.left')
get_frontier(airquality, Ozone, Temp, quadrant = 'bottom.right')
[Package KraljicMatrix version 0.2.1 Index]