Skip to content

Instantly share code, notes, and snippets.

@jstray
Created September 18, 2012 04:26
Show Gist options
  • Save jstray/3741258 to your computer and use it in GitHub Desktop.
Save jstray/3741258 to your computer and use it in GitHub Desktop.
Get recent votes in UK house of Lords data
# -------------------------------- 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