Skip to content

Instantly share code, notes, and snippets.

@cdesante
Created October 23, 2012 17:29
Show Gist options
  • Save cdesante/3940217 to your computer and use it in GitHub Desktop.
Save cdesante/3940217 to your computer and use it in GitHub Desktop.
cast6
head(ANES)
party.and.region <- ANES[,c(1, 12, 16)]
head(party.and.region)
#Note the additional changes to our id=():
party.and.region.year <- melt(party.and.region, id=c("year", "south"), na.rm=TRUE)
head(party.and.region.year)
#Note the additional changes to our formula (below):
party.region.time <- (cast(party.and.region.year, year+south~variable,
mean, na.rm=T) )
party.region.time
dim(party.region.time)
P2 <- ggplot(data = party.region.time) + geom_point(aes(x = year,
y = pid7, colour=as.factor(south)))
P2 <- P2 + ylim(0,6) + labs(title="geom_point, P2")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment