Learn R Programming

pscl (version 1.5.5.1)

convertCodes: convert entries in a rollcall matrix to binary form

Description

Convert roll call matrix to binary form using encoding information.

Usage

convertCodes(object, codes = object$codes)

Value

a matrix with dimensions equal to the dimensions of the votes component of the rollcall object.

Arguments

object

rollcall object

codes

list, mapping entries in the votes component of rollcall object to 0 (‘Nay’), 1 (‘Yea’) and NA (missing, abstentions, etc). Defaults to the codes component of the rollcall object.

Author

Simon Jackman simon.jackman@sydney.edu.au

Details

See rollcall for details on the form of the codes list.

See Also

rollcall

Examples

Run this code
  data(s109)
  mat <- convertCodes(s109)
  table(mat,exclude=NULL)

Run the code above in your browser using DataLab