The Gini coefficient or index is a measure of inequality or diversity.
It is zero if all the values of x are equal.
It reaches a maximum value of 1/nrow(x) when all values are zero except for one.
The Gini index is only interpretable for non-negative quantities.
It is not meaningful if x contains negative values.