Description Usage Arguments Value See Also Examples
Extract the points that make up the Pareto frontier from a set of data.
1 2 | get_frontier(data, x, y, quadrant = c("top.right", "bottom.right",
"bottom.left", "top.left"), decreasing = TRUE)
|
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 |
A data frame containing the data points that make up the efficient frontier.
geom_frontier
for plotting the Pareto front
1 2 3 4 5 6 7 8 9 10 | # 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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.