[R] determine upper convex hull, 2-dimensional case

Richard and Barbara Males rbmales at gmail.com
Mon Mar 22 22:35:22 CET 2010


For an environmental planning example that involves looking at the
relative efficiencies of one plan over another, I need to determine
the pareto-efficient plans (which I have done), and then, within that
set of plans, determine the convex hull representing the outer upper
boundary of those points.  I have a dataframe, dfPlans,  as follows,
representing the pareto-efficient  cost and benefit of different
environmental restoration plans out of a larger set of plans, where
A1, EC, A6, and A4 are identifiers for the plans.

              Cost              Benefit
A1              0.00              0.000
EC              0.00        7821.689
A6          76783.19    16094.142
A4          78703.73    22245.760

I am interesting in determining what I believe is called the upper
convex hull, i.e. the upper outer boundary if I plot benefit on the y
axis, cost on the x axis.  This should be plans A1, EC, and A4, and
not point A6.   I have used chull, which returns all of the points,
including A6, and have tried to use convhulln with the QU option, but
I am unclear as to how to interpret the results, which are returned as
follows:

> chull(dfPlans)
[1] 1 2 3 4
> convhulln(dfPlans,option="QU")
   [,1] [,2]
[1,]    3    2
[2,]    3    4
[3,]    1    2
[4,]    1    4

Any assistance greatly appreciated, any way to accomplish my goal
(need not use convhulln or chull).

Thanks in advance.

--
Richard M. Males
Cincinnati, OH USA



More information about the R-help mailing list