search for: classcolors

Displaying 2 results from an estimated 2 matches for "classcolors".

2012 Jan 27
1
Overimposing one map in ssplot onto another
...admin units: nrofunits<-length(can2$NAME_2) groups<-c(rep(1:6,(nrofunits %/% 6)),rep(1,5))[order(c(rep(1:6,(nrofunits %/% 6)),rep(1,5)))] # adding values (grouping values) to "data": can2 at data[["groups"]]<-groups can2 at data$groups<-as.factor(can2 at data$groups) classcolors <- rainbow(6) spplot(can2,zcol="groups",col.regions=classcolors,colorkey = FALSE,lwd=.4,col='white', par.settings = list(axis.line = list(col='transparent'))) -- Dimitri Liakhovitski marketfusionanalytics.com
2012 Jan 13
1
Coloring counties on a full US map based on a certain criterion
Dear Rers, is there a way to color counties on a full US map based on a criterion one establishes (i.e., all counties I assign the same number should be the same color)? I explored a bit and looks like the package "maps" might be of help. library(maps) One could get a map of the US: map('usa') One could get countries within a US state: map('county', 'iowa', fill