uniquify.MPnames {tapiR} | R Documentation |
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.
uniquify.MPnames(ayes.or.noes, namerules = namerules.9203)
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. |
A character matrix, with one row for each element of ayes.or.noes
.
Two columns, MPname
and seatname
.
This function would not normally be called by the user
of the tapiR package;
it is used internally by collect.MPnames
and make.votesheet
.
David Firth
uniquify.MPnames(c("Smith, Mr John (This Place)", "Jones, Dr Bill (Some Other Place)", "Spratt, Jack"))