[R] Problem to load a shape file

dms at riseup.net dms at riseup.net
Sat Dec 29 08:14:44 CET 2012


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.



More information about the R-help mailing list