Description Usage Arguments Examples
Create an object of esaps
class to calculate party system indicators.
1 2 3 |
path |
Character vector containing one or more path names. |
dataset |
Electoral results by party. It can be a |
name.file |
Name of the database file. |
extention |
Extension of the database format. |
nCountry |
Number of countries (number of sheets). |
name.year |
Name of the variable that contains years. |
name.country |
Name of the variable that contains the country. |
name.M |
Name of the variable that contains the district magnitude (M+1). It is for the calculation of endogenous and exogenous electoral volatility (Torcal and Lago, 2015). |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | votes <- list(data.frame(country = rep("ARG", 3),
year = c(1995, 2000, 2005),
party_A = c(40,10,20),
party_B = c(35,20,40),
party_C = c(25,70,40)),
data.frame(country = rep("URY", 4),
year = c(1995, 2000, 2005, 2010),
party_A = c(30,30,20,20),
party_B = c(30,50,40, 30),
party_C = c(30,10,30, 25),
party_D = c(10,10,10,25)),
data.frame(country = rep("BRA", 2),
year = c(1993, 1998),
party_A = c(30, 55),
party_B = c(70, 45)))
votes <- esaps_object(dataset=votes, name.country="country", name.year="year")
is(votes, "esaps") ## TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.