Create a gist now

Instantly share code, notes, and snippets.

election3
Ohio <- c()
California <- c()
Alabama <- c()
for ( i in 1:1000) {
Ohio[i] <- sample (c("Obama", "Romney"), 1)
California[i] <- sample(c(rep("Obama", 9), "Romney"))
Alabama[i] <- sample( c(rep("Obama", 1), rep("Romney", 9)), 1)
}
ftable(Ohio, California, Alabama)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment