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

From: Roger Bivand <Roger.Bivand_at_nhh.no>
Date: Wed, 12 Mar 2008 13:28:04 +0000 (UTC)

Don MacQueen <macq <at> llnl.gov> writes:

>
> 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')

You may also - for safety's sake - say:

list.files(path="C:/path_to_my_file", pattern="filename")

to make sure that at least the minimum three files that make up a "shapefile" are present: filename.dbf, filename.shp, and filename.shx. Note that in Windows you can also use the file chooser, by saying:

readShapePoints(file.choose())

which will let you navigate to, and "see" the file name for yourself.

Roger

PS. As Paul mentioned, the R-sig-geo list is well suited to this kind of question.

>
> Hope this helps.
> -Don
>
>



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 12 Mar 2008 - 13:46:24 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:30:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive