Skip to content
Prev 314330 / 398513 Next

Problem to load a shape file

Dear all, I've been puzzled why I not able to load a shapefile from a
connection. Does anyone here can give a reasonable answer?
When I try the following script I got this error:
Error in getinfo.shape(fn) : Error opening SHP file


#Reproduction

temp <- tempfile()
download.file("http://metodologiapolitica.com/download/Brasil.zip",temp)
shp.br <- readShapePoly(unzip(temp, "Brasil.shp"))
unlink(temp)

Just for acknowledgement, I successful can load the file whenever I open
it from the disk.