[R] How to get rid of extra areas on spatial data map
csun at CFR.MsState.Edu
Fri Apr 16 20:19:03 CEST 2010
I am using "sp" and "maps" libraries to have a map for some fire data.
The region covered is Mississippi State in the US. Then I would like to
add a layer of ecoregion on the top (omenrik layer from
nationalatlas.gov). The problem is that the ecoregion layer is larger
than the state boundary. How can I get rid of these ecoregion areas out
of MS state?
The code is like this:
# Both data.fire and data.ecoregion are class of
# Every fire is within the state boundary so it looks nice.
# Some ecoregions go beyond the state boundary.
map('state', region = 'mississippi', col='red')
Any hint is greatly appreciated.
More information about the R-help