An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110524/6055ffe2/attachment.pl>
plotting texas school district using shape files
4 messages · Ben Bolker, Shant Ch
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
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110525/f5b3fb22/attachment.pl>
Shant Ch <sha1one <at> yahoo.com> writes:
Yes I had included the library(maptools) in my code, it is already installed in my computer. but still it is showing the same error.
In that case you should (1) read the posting guide, (2) copy and
paste the code you ran, and the precise error you got, into an
email to the list that also includes (3) the results of running
sessionInfo() during your R session (after loading the maptools
package).
Then perhaps we will have enough information to help diagnose
the problem.
PS: a little more poking around shows that, at least on my
system, read.shape() is *not* part of the maptools package.
help.search("read.shape") finds maptools::readShapeSpatial.
library("sos"); findFn("read.shape") discovers that there
is a read.shape() function in the spsurvey package.
Ben Bolker
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.
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