Re: [R] Error opening SHP file

2016-01-22 Thread David Winsemius
> On Jan 22, 2016, at 9:24 AM, Amoy Yang via R-help > wrote: > > This is the results that addresses David's advice. >> library(maptools) >> library(maps) >> state.map <- readShapeSpatial("maps/st24_d00.shp") > Error in getinfo.shape(fn) : Error opening SHP file >> # David

Re: [R] Error opening SHP file

2016-01-22 Thread Amoy Yang via R-help
Let me just make this case simple and quick to address what I need. Giving a data-file that includes tow columns: zip5 and population. How do I put pop (colored with different segments) by zips (with boundary) on the USA map with R? Amoy On Friday, January 22, 2016 12:45 PM, David

Re: [R] Error opening SHP file

2016-01-22 Thread boB Rudis
Look at the choroplethr package. On Fri, Jan 22, 2016 at 5:31 PM, Amoy Yang wrote: > Let me just make this case simple and quick to address what I need. > > Giving a data-file that includes tow columns: zip5 and population. How do I > put pop (colored with different segments)

Re: [R] Error opening SHP file

2016-01-22 Thread Barry Rowlingson
We can duplicate the error by giving a path to a non-existent shapefile, which is probably the original problem: > require(maptools) Loading required package: maptools Loading required package: sp Checking rgeos availability: TRUE > foo=readShapeSpatial("fnord.shp") Error in getinfo.shape(fn) :

Re: [R] Error opening SHP file

2016-01-22 Thread Amoy Yang via R-help
This is the results that addresses David's advice. > library(maptools) > library(maps) > state.map <- readShapeSpatial("maps/st24_d00.shp") Error in getinfo.shape(fn) : Error opening SHP file > # David question: What does list.files('maps') return? Is there a > 'st24_d00.shp' value in there? >

Re: [R] Error opening SHP file

2016-01-21 Thread David Winsemius
> On Jan 21, 2016, at 4:39 PM, Amoy Yang via R-help > wrote: > > Any advice for the following errors? > state.map <- readShapeSpatial("maps/st24_d00.shp") > Error in getinfo.shape(fn) : Error opening SHP file What does list.files('maps') return? Is there a 'st24_d00.shp'

[R] Error opening SHP file

2016-01-21 Thread Amoy Yang via R-help
Any advice for the following errors? state.map <- readShapeSpatial("maps/st24_d00.shp") Error in getinfo.shape(fn) : Error opening SHP file [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more,

Re: [R] Error opening SHP file

2016-01-21 Thread Jim Lemon
Hi Amoy, Another mystery question. I should have pursued parapsychology. That error statement is usually followed by one noting that the file specified cannot be found. Today's guess is that the R working directory: getwd() did not have a "maps" directory below it. Jim On Fri, Jan 22, 2016 at

Re: [R] Error opening SHP file

2016-01-21 Thread boB Rudis
Agreed with the others. After finding that shapefile and getting it to work you are definitely not in the proper working directory. On Thu, Jan 21, 2016 at 8:40 PM, David Winsemius wrote: > >> On Jan 21, 2016, at 4:39 PM, Amoy Yang via R-help >>

[R] Error opening SHP file (maptools)

2008-03-11 Thread gerickes
I am having difficulty loading a points shapefile (1600 records) I generated from ArcGIS as a PointsSpatialDataFrame using the maptools readShapePoints function. library(maptools) surveypts - readShapePoints(system.file(C:/temp/survey.shp, package=maptools)[1] Error in getinfo.shape(filen) :

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

2008-03-11 Thread Paul Hiemstra
[EMAIL PROTECTED] schreef: I am having difficulty loading a points shapefile (1600 records) I generated from ArcGIS as a PointsSpatialDataFrame using the maptools readShapePoints function. library(maptools) surveypts - readShapePoints(system.file(C:/temp/survey.shp, package=maptools)[1]

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

2008-03-11 Thread Don MacQueen
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