# NOT RUN {
#### look at the counties of Oregon
data(countyfips)
countyfips[countyfips$statename=="oregon",]
### The county fips code is the last three characters
county.f<-"001"
county.n<-c("deschutes","crook county")
## Pull out these counties
c1<-county(fips=county.f,state="or",level="tract")
c2<-county(name=county.n,state="or",level="tract")
##Plot counties
oregon.counties<-countyfips[countyfips$statename=="oregon",]
col<-cbind(c("red","blue"),c("013","017"))
plot(c2,col=col[match(c2$county,col[,2]),1],border="gray")
title("Deschutes and Crook counties, OR 2000")
coord<-coordinates(c2)
text(coord[c(1,4),],oregon.counties$countyname[oregon.counties$countyname%in%county.n],cex=2)
# }
Run the code above in your browser using DataLab