mapvariable(y, spatial.polygon, ncut=1000, nlevels=10, lower=NULL, upper=NULL, main=NULL, xlab=NULL, ylab=NULL)
y
E. J. Pebesma and R. S. Bivand. (2005) Classes and methods for spatial data in R. R News, 5, 9--13.
data(scotland) map <- scotland$spatial.polygon y <- scotland$data$cases E <- scotland$data$expected SMR <- y/E mapvariable(SMR,map,main="Scotland",xlab="Eastings (km)",ylab="Northings (km)")
Run the code above in your browser using DataLab