Skip to content

Instantly share code, notes, and snippets.



Created Oct 26, 2011
What would you like to do?
# Corrupt countries were more likely to support the OOXML document format
# Kirjoittaja: Kai Puolamäki, Syyskuu 5, 2007 - 08:22.
# Read in the data table:
B <- read.csv("")
# CPI indices of the countries that voted for approval:
capp <- B[![,"CPI"]) & (B[,"Vote"]=="Approval" |
B[,"Vote"]=="Approval with comments"),"CPI"]
# CPI indices of the countries that voted for disapproval:
cdis <- B[![,"CPI"]) & B[,"Vote"]=="Disapproval","CPI"]
# Is there a relation between the CPI index and voting behaviour of a country?
# W = 281.5, p-value = 0.01944
# Make a nice figure of the result, containing votes of all national bodies
# (except Fiji which has no CPI index):
x <- matrix(c(table(factor(floor(capp),levels=2:9)),
barplot(x, main='"18 negative votes out of 69"',
xlab="lots of corruption - CPI - little corruption",
ylab="national body votes (except Fiji)",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.