Have a look in the folder where your shapefile is. Is there actually a .dbf
file? If there is, it sounds like it is empty or corrupted, or misnamed. Are you expecting your shapefile to have polygons with attributes. Can you try importShapefile(... readDBF = FALSE )
? Maybe you can make our data available through a dropbox link or something?
Alternatively have you tried rgdal:::readOGR
or, my personal favourite, maptools:::readShapePoly()
. I personally find readShapePoly()
to be extremely robust and there are methods for coercing a SpatialPolygonsDataFrame
from sp
to a PolySet
from PBS.
If you really must use PBS have you tried...
require( maptools )
require( sp )
myshp <- readShapePoly("Data/pvi_stat_2002_utm")
myshpPBS <- SpatialPolygons2PolySet( myshp )
I am assuming that there is a .prj
file with your shapefile, describing the projection information?