[R] R equiv to proc gremove in maps package
Ray Brownrigg
ray at mcs.vuw.ac.nz
Mon Mar 15 20:25:26 CET 2004
> Is there an R equivalent to SAS's proc gremove? You would use this procedure to combine the units on an existing map, for example to build a map of Metropolitan Statistical Areas (MSAs) from the [US] counties dataset where the internal boundries surround the MSAs (which are groups of counties) rather than the individual counties. I can imagine the mechanism would be to find and erase the boundries within each group. Is there a way to do that in R? I looked at the S reference on building geographical databases, and I could probably fumble through the C code to build the binary files of lines and polygons, but have no idea how to implement the shell program to extract the datapoints. Thanks.
>
It's already built in to the maps package.
Try e.g.:
map("county", c("arizona,gila", "arizona,maricopa", "arizona,yavapai"), interior=F)
[I wouldn't have believed that it worked until I tried!]
Hope this helps,
Ray Brownrigg
More information about the R-help
mailing list