uniquify.MPnames {tapiR}R Documentation

Put MP Names into a Unique Form

Description

Hansard, the official Parliamentary record, frequently uses different forms for the name of the same MP. This function applies both general rules, and ad hominem rules contained in the function supplied as argument namerules, to convert all names to a pre-determined form.

Usage

uniquify.MPnames(ayes.or.noes, namerules = namerules.9203)

Arguments

ayes.or.noes A character vector of MP names, typically either Ayes or Noes from a Hansard division list.
namerules A function implementing particularistic rules by which certain names should be changed. This function takes two arguments, MPnames and seatnames, character vectors of the same length; it returns a 2-component list with components named MPnames and seatnames, these being the same vectors after modification by the rules.

Value

A character matrix, with one row for each element of ayes.or.noes. Two columns, MPname and seatname.

Author(s)

David Firth

Examples

uniquify.MPnames(c("Smith, Mr John (This Place)", 
"Jones, Dr Bill (Some Other Place)", "Spratt, Jack"))

[Package tapiR version 0.6-3 Index]