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) by zips (with bounda
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 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 question: What does li
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?
> lis
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) :
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
>> wrote:
>>
>> Any advice for the following errors?
> 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' value in there?
--
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
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, se
Don MacQueen 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
> y
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
[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="map
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)
13 matches
Mail list logo