Learn R Programming

pscl (version 0.5)

dropRollCall: drop user-specified elements from a rollcall object

Description

drop user-specified elements of rollcall object, returning a roll call object.

Usage

dropRollCall(object, dropList)

Arguments

object
an object of class rollcall
dropList
a list (or alist) with some (or all) of the following components: codes{character or numeric, possibly a vector. If

Value

  • An object of class rollcall with components modified by the subsetting indicated in the dropList.

Details

It is often desirable to restrict the analysis of roll call data in various ways. For one thing, unanimous votes provide no information discriminating among legislators: hence, a useful default for summary and analysis is dropList=list(lop=0). See the examples for other possibilities, limited only by the information supplied in legis.data and votes.data.

See Also

dropUnanimous, summary.rollcall, ideal, alist.

Examples

Run this code
data(s109)
s109.working <- dropRollCall(s109,
                             dropList=list(lop=0))
s109.working <- dropRollCall(s109,
                             dropList=list(lop=0,
                               code="notInLegis"))
s109.working <- dropRollCall(s109,
                             dropList=list(lop=3,
                               code="notInLegis"))

## note use of alist, since dropLegis is an expression
dropList <- alist(lop=3,
                 dropLegis=party!="D",
                 code="notInLegis")
s109.working <- dropRollCall(s109,dropList=dropList)

Run the code above in your browser using DataLab