Native R map objects
Creation
Usage: rmap(data,coords,type='point')
Feed the function a data frame for the entity information and a
list of 2-column matrices for the coordinates. For example:
# fake 10 lots of data:
> md <- data.frame(z1=runif(10),z2 <- rnorm(10))
# make a unit polygon:
> mc <- list(cbind(c(0,1,1,0),c(1,1,0,0)))
# construct a diagonal chain of unit polygons:
> for(i in 1:9){ mc[[length(mc)+1]] <- mc[[length(mc)]]+1}
# now make an R map object
> mp <- rmap(md,mc,type='poly')
# test
> plot(mp,fill=mp$z1*10)
Support
Can be points, lines, or polys. Can be subscripted. Can be projected.