[R] Problem to load a shape file

MacQueen, Don macqueen1 at llnl.gov
Wed Jan 2 19:13:27 CET 2013

What does the 
   unzip(temp, "Brasil.shp")
function produce?

A "shapefile" is actually several files, and all must be present in order
to read the "shapefile".

I'd also suggest r-sig-geo for this kind of question.


Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550

On 12/28/12 11:14 PM, "dms at riseup.net" <dms at riseup.net> wrote:

>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
>temp <- tempfile()
>shp.br <- readShapePoly(unzip(temp, "Brasil.shp"))
>Just for acknowledgement, I successful can load the file whenever I open
>it from the disk.
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list