[R-sig-Geo] RE: [R] adjacency matrix
Orlando Zacarias
si-opz at dsv.su.se
Thu Oct 23 18:56:43 CEST 2003
Hi once again,
Now i have been trying to run the R changed example from Maptools package
manual, and errors occur underlined bellow. It is really troublesome....
Please assist,
Orlando.
---------------------------------------------------
shp <- try(library(shapefiles))
Error in library(maptools) : There is no package called 'shapefiles'
> if (class(shp) != "try-error") {
+ ShapeDir <- system.file("shapes", package="maptools")[1]
+ try1 <- read.shapefile(paste(ShapeDir, "shapes", sep="/"))
+ shppolys <- shape2poly(try1, as.character(try1$dbf$dbf$NEIGNO))
+ plotpolys(shppolys)
+ title(main="Polygons for Vermani from shapefiles package")
+ }
>
> try2 <- read.shape(system.file("shapes/Vermani.shp",
+ package="maptools/man")[1])
Error: couldn't find function "read.shape"
> mappolys <- Map2poly(try2, as.character(try2$att.data$NEIGNO))
Error: couldn't find function "Map2poly"
> plotpolys(mappolys)
Error: couldn't find function "plotpolys"
> title(main="Polygons for Vermani from maptools package")
Error in title(main = "Polygons for Vermani from maptools package") :
plot.new has not been called yet
> if (class(shp) != "try-error") {
+ plotpolys(shppolys)
+ plotpolys(mappolys, add=TRUE, border="red", lty="dotted")
+ title(main="Polygons for Vermani overplotted from both packages")
+ }
------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20031023/c5da4174/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 41982 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20031023/c5da4174/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 1738 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20031023/c5da4174/attachment-0001.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 494 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20031023/c5da4174/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 3937 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20031023/c5da4174/attachment-0003.gif>
More information about the R-sig-Geo
mailing list