I am using this ggplot2 code to create a US map:
library(ggplot2)
all_states <- map_data("state")
p <- ggplot()
p <- p + geom_polygon( data=all_states, aes(x=long, y=lat, group = group),colour="white", fill="grey30" )
Now I have a set of states that I would like to paint red and a couple I want to paint green. Like this:
states_positive <- c("New York")
states_negative <- c("Texas")
Any thoughts on how I can make sure that only these states are highlighted in the relevant colour on the map?\