write.votesheet {tapiR}R Documentation

Output House of Commons Voting Data Compactly

Description

Writes out a data frame of House of Commons voting data, either to a text file or to standard output.

Usage

write.votesheet(x, file = NULL, keep.b = TRUE, 
        aye = "y", no = "n", novote = "-")

Arguments

x A data frame of the kind made by make.votesheet
file An optional file name for the printed representation. If NULL, printing is to standard output.
keep.b Should instances of b in the voting data, meaning that an MP was recorded as having voted both Aye and No, be retained in the output? If FALSE, then b is converted everywhere to -.
aye A one-character code for an Aye vote.
no A one-character code for a No vote.
novote A one-character code for neither Aye nor No (i.e., a vote was not recorded)

Value

invisible(NULL)

Note

Codes used as input to Keith Poole's OC (optimal classification) program are aye = "1", no = "6", novote = "0"

Author(s)

David Firth

References

Firth, D and Spirling, A (2003) Divisions of the United Kingdom House of Commons, from 1992 to 2003 and beyond. Submitted for publication. At http://www.warwick.ac.uk/go/tapir.

Examples

## Not run: 
## requires file "Votes0105.csv", downloadable from the URL above.
Votes0105 <- read.csv("Votes0105.csv")
row.names(Votes0105) <- Votes0105$X
Votes0105$X <- NULL
write.votesheet(Votes0105[1:10, 1:10])
## End(Not run)

[Package tapiR version 0.7-5 Index]