I am guessing there is a simple solution to the problem I have been having, but I am having some trouble.
I am trying to convert the following map
objec
Polygons have surface (area), therefore the key argument is fill = TRUE
in
usa <- map('state', fill = TRUE)
Changing the argument value to TRUE stops the error message.
Just found some code in the text "Applied Spatial Data Analysis with R". It works great!
require(maps)
usa <- map("state", fill = TRUE)
require(sp)
require(maptools)
IDs <- sapply(strsplit(usa$names, ":"), function(x) x[1])
usa <- map2SpatialPolygons(usa, IDs=IDs, proj4string=CRS("+proj=longlat +datum=WGS84"))