Re: [R] Error opening SHP file (maptools)

From: Don MacQueen <>
Date: Tue, 11 Mar 2008 18:28:02 -0700

The help page for readShapePoints says that the file name that you supply should not include the extension.

The "system.file" part of the example in the help page is only to use the example file that came with the package. Since you want to open your own file you omit the system.file() bit.

Do something like:

    readShapePoints( 'C:/path_to_my_file/filename')

Hope this helps.

At 12:05 PM -0600 3/11/08, wrote:
>I am having difficulty loading a points shapefile (1600 records) I
>generated from ArcGIS as a PointsSpatialDataFrame using the maptools
>readShapePoints function.
>surveypts <- readShapePoints(system.file("C:/temp/survey.shp",
>Error in getinfo.shape(filen) : Error opening SHP file
>I've tried numerous re-exports and renames of the dataset, to no
>avail. I've also tried placing the shapefile in the library's
>shapefile folder, with the example dataset (see example below).
>x <- readShapePoints(system.file("shapes/survey.shp", package="maptools")[1]
>No luck there either. I'm quite new to R, but I can follow a manual
>and google well enough. However, I haven't seen anything to help me.
>The example point datasets load fine. I figure that I'm missing on
>some familiarity with R and that I don't know the tricks yet. Any
>Thanks in advance.
>Gericke Cook
> mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

Don MacQueen
Lawrence Livermore National Laboratory
Livermore, CA, USA

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 12 Mar 2008 - 01:32:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 12 Mar 2008 - 14:00:23 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive