dropUnanimous.matrix(obj, lop = 0)
matrix
, where rows index
legislators, and columns index votesobject
. Roll calls with lop
or fewer legislators voting in the minority are dropped.matrix
, with n
rows (same as in the input
matrix) but possibly less than the original number of columns.c(0,1,NA)
, as is created
by convertCodes
. Each column of the roll call matrix is
inspected, and the minimum of the number of 0
(1
(lop
, the column is
deleted from the matrix returned by this function.dropUnanimous
, convertCodes
data(s109)
mat <- convertCodes(s109)
class(mat)
dim(mat)
dim(dropUnanimous(mat))
## compare with operating on the rollcall object directly
## with dropUnanimous.rollcall
## produces an identical matrix
dim(dropUnanimous(s109)$votes)
Run the code above in your browser using DataLab