Learn R Programming

hansard (version 0.3.4)

mp_vote_record: mp_vote_record

Description

Accepts an ID number for a member of the House of Commons, and returns a data frame of their votes. Provides similar functionality to the commons_divisions() function, but accepts member IDs as function parameters rather than requesting them from the console.

Usage

mp_vote_record(mp.id, voteRecord = c("all", "aye", "no"))

Arguments

mp.id
The ID number of a member of the House of Commons. To look up the ID number of a member of the House of Commons use the members_search() function.
voteRecord
Accepts the arguments 'all', 'aye' and 'no'. Defaults to 'all'.
all
Returns a data frame with all recorded votes for a given member of the house of commons.
aye
Returns a data frame with all divisions where a given MP voted aye.
no
Returns a data frame with all divisions where a given MP voted no.

Examples

Run this code
## Not run: 
# x <- mp_vote_record(172, 'all')
# 
# x <- mp_vote_record(172, 'aye')
# 
# x <- mp_vote_record(172, 'no')
# ## End(Not run)

Run the code above in your browser using DataLab