Displaying 1 result from an estimated 1 matches for "nor_coast_poly_sp".
2007 Sep 17
1
map issues
...e function map2SpatialPolygons. And the example code there is:
library(maps)
nor_coast_poly <- map("world", "norway", fill=TRUE, col="transparent", plot=FALSE)
nor_coast_poly$names
IDs <- sapply(strsplit(nor_coast_poly$names, ":"), function(x) x[1])
nor_coast_poly_sp <- map2SpatialPolygons(nor_coast_poly, IDs=IDs, proj4string=CRS("+proj=longlat +datum=wgs84"))
This works fine. So I was most puzzled. And then i did
> is(nor_coast_poly)
[1] "map"
> is(districts)
[1] "Map"
So the object i have created is a Map object whi...