Created
September 18, 2012 04:26
-
-
Save jstray/3741258 to your computer and use it in GitHub Desktop.
Get recent votes in UK house of Lords data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------- Take recent votes ------------------------------ | |
# take only N most recent votes | |
Nvotes=100 | |
recentvotes = votes[,1:Nvotes] | |
# set MP row names to party name | |
row.names(recentvotes) = lords[,"party"] | |
# remove all MPs who didn't vote at all in these recent votes | |
recentvotes = recentvotes[rowSums(abs(recentvotes)) != 0, ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment