Created
March 26, 2015 08:30
-
-
Save pbiecek/8765ca59b68a321a0cd8 to your computer and use it in GitHub Desktop.
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
# select only specific cols | |
group1 <- "Males" | |
group2 <- "Females" | |
# convert characters to numbers | |
xx <- as.numeric(votesGroup[,group1]) | |
yy <- as.numeric(votesGroup[,group2]) | |
gr <- cut(xx - yy, c(-10,-0.5,0.5,10)) | |
df <- data.frame(x = xx, y = yy, gr = gr, | |
name = votesGroup[,"serialName"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment