R/party_nationalization_score.R

Defines functions pns

Documented in pns

#  Parties System Indicators
#
# Party Nationalization Score
# Consejo Nacional Electoral - Ecuador (2014)
#

pns <- function(subnational_shares) {
     if (class(subnational_shares) != 'numeric') {
          stop('Input vector must be numeric')
     }
     1-Gini(subnational_shares)
}

Try the electoral package in your browser

Any scripts or data that you put into this service are public.

electoral documentation built on Sept. 29, 2017, 1:05 a.m.