This index measures electoral disproportionality based on the result obtained in an election.
It has the disadvantage that it is highly influenced by the number of small parties that compete in
the elections. The formula used is as follows:
$$R=\frac{\sum_{i=1}^{n}|E_{i}-V_{i}|}{n}$$
for \(i = 1, 2, \ldots,n\)
To compute its value, an integer vector corresponding to the votes obtained by each party and another with
the corresponding seats must be provided as parameters of the formula. The R code will be in charge of
calculating the corresponding percentages to obtain the index.