I don't know what this is, but you might want to double check that it hasn't already been implemented in R by someone else, since there are a few packages that have inequality measures (e.g. Gini, RS, Atkinson, Theil, Kolm). See, for example, the ineq package.