[R] plotting texas school district using shape files

Ben Bolker bbolker at gmail.com
Wed May 25 14:06:19 CEST 2011


Shant Ch <sha1one <at> yahoo.com> writes:

> 
> Hi,
> 
> I was plotting or creating a map for Texas school districts 
> using the shape file 
> of Texas. I could not find any other helpful mail in the mailing list.
> 
> txshp<-read.shape(system.file("S:\\Districts_10_11.shp", package="maptools"))
> 
> Error-  read.shape no found. But read.shape is there in maptools. 
> 

   A couple of things: that's probably not the *exact* error you
got.  Did you remember to load the package first with library("maptools") ... ?
(You did install the package first, too, right?)
  
  After you have done that I suspect you will still have a problem with
finding the file -- I think you want something like

library("maptools")
txtshp <- read.shape("S:\\Districts_10_11.shp")

  Ben Bolker



More information about the R-help mailing list