Description Usage Arguments Value Examples
View source: R/Electoral_index.R
Another very important indicator of the party system is the concentration of votes, which indicates what percentage of votes or seats are taken by the two parties that have the largest number of votes. The formula used to calculate this indicator is as follows:
concentration= p1+p2
The maximum value that this indicator takes is 1, so the closer it is to 1, the more concentrated the vote is.
1 | concentracion(votes, seats)
|
votes |
It is a vector of integers, containing the votes of all the candidates. |
seats |
It is a vector of integers, containing the seats obtained by each of the candidates. |
Returns a dataframe, with the columns "electoral" and "parliamentary" to store the value of the index of the concentration of votes in the electoral or the parliamentary way respectively.
1 | concentracion(c(3947,3189,1971,466,345,82),c(184,99,44,10,1,0))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.