source('http://www-stat.stanford.edu/~jtaylo/venezuela/functions.R') read.data <- function(which.level='station', url=dataurl) { cur.table <- read.table(geturl(paste('http://www-stat.stanford.edu/~jtaylo/venezuela/', which.level, '_results.table', sep=''), url=url), sep=',', header=T) return(cur.table) } station.data <- read.data() attach(station.data) ncenter <- length(nmachine) center.data <- read.table(geturl('http://www-stat.stanford.edu/~jtaylo/venezuela/center_results.table', url=''), sep=',', header=T) # recreate columns of all VOTES.YES and VOTES.NO VOTED.YES <- c(votes.YES.1, votes.YES.2, votes.YES.3) VOTED.NO <- c(votes.NO.1, votes.NO.2, votes.NO.3) TOTAL.VOTES <- VOTED.NO + VOTED.YES VOTED.YES <- VOTED.YES[!is.na(TOTAL.VOTES)] VOTED.NO <- VOTED.NO[!is.na(TOTAL.VOTES)] TOTAL.VOTES <- TOTAL.VOTES[!is.na(TOTAL.VOTES)] source('http://www-stat.stanford.edu/~jtaylo/venezuela/covariance-calculations.R')