search for: nor_coast_poly

Displaying 1 result from an estimated 1 matches for "nor_coast_poly".

2007 Sep 17
1
map issues
...or in to[nParts] <- nrow(xy) : incompatible types (from NULL to integer) in subassignment type fix In addition: Warning message: is.na() applied to non-(list or vector) in: is.na(object) I went back to the help on the 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("+p...