rc_ep | R Documentation |
An object of class rollcall
that contains information about legislators and votes from the the European Parliament 1979-1984.
data(hr108)
A 548x886 matrix of votes for all of the legislators.
A list containing the maps of numerical values to yea, nay, NIL and missing votes.
Number of rows in votes
Number of columns in votes
A data frame comtaining information about the legislators - MEP ID, MEP name, country, National party affiliation, party group affiliation.
NULL
Descriptive text for the dataset
NULL
We used the following code to transform the raw data in rcv_ep1
into a rollcall
object.
library(pscl)
data(rcv_ep1)
rc <- rollcall(data=rcv_ep1[,6:ncol(rcv_ep1)],
yea=1,
nay=2,
missing=c(3,4,0),
notInLegis=5,
legis.names=rcv_ep1[["MEPNAME"]],
vote.names=colnames(rcv_ep1[6:ncol(rcv_ep1)]),
legis.data=rcv_ep1[,1:5][,-2],
vote.data=NULL,
desc="1st European Parliament (1979-1984) Roll Call Data")
The arguments required by the rollcall()
function are similar to those in readKH()
, except that the legislator and vote-specific variables must be specified. First, data
is set as the matrix of roll call votes (the sixth through final columns of the rcv\_ep1
dataset). The numeric codes are then set for yea
, nay
, missing
, and notInLegis
votes. legis.names
is a vector of the legislator names. vote.names
is a vector of the roll call vote names (we simply use the column names of the votes). legis.data
is a vector or matrix of legislator-specific variables. In this example, we have four such variables: MEPID
, MS
, NP
, and EPG
in the first and second through fifth columns. We want to omit the legislator names (in the second column), so we use the command: rcv\_ep1[,1:5][,-2]
. vote.data
is a vector or matrix of vote-specific variables (for example, roll call vote descriptions). We leave this parameter NULL
since we have no such variable(s). Finally, desc
is a short description of the roll call voting data.
http://personal.lse.ac.uk/hix/HixNouryRolandEPdata.htm
data(rc_ep)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.