search for: popdich

Displaying 1 result from an estimated 1 matches for "popdich".

Did you mean: poich
2012 Jun 28
2
R help, using R to build choropleth
...population=read.csv("nz2.csv") population names(population) nz=readShapeSpatial((sprintf('nz-geodetic-marks',tmp_dir))) nz$land_distr mapnames = nz$land_distr mapnamesnew=as.character(mapnames) popnames =as.character(mapnamesnew) pop =population$People pop2=as.numeric(pop) popdich = ifelse(pop2 < 100000, "red", "blue") popnames.lower = tolower(popnames) cols=popdich[match(mapnames,popnames.lower)] plot(nz,fill=TRUE,col=cols,proj="GCS_NZGD_2000") thanks in advance for any assistance Kind regards Iverson -- View this message in conte...