[R-sig-Geo] difficult to subtract two column of my shapefile

Alessandro alessandro.montaghi at unifi.it
Tue Feb 24 14:41:05 CET 2009


Thanks for all help

 

I wish two subtract two column of my shapefile but It look like a impossible
operation with R:

 

1.  In SAGA+R module: "Table calculator for shapes", It runs but doesn't
save the result (there is bug)

2.   I can't use software "GeoDa" because It works only in Windows xp and
not in Windows Vista

3.  Library maptools go down for a memory problems

4.  library(rgdal) give an empty column

 

is there suggestion? please.

 

I attach a small part of my data-set for 

 

Thanks for Help and suggestion

 

 

library(maptools)

my_SPDF <- readShapeSpatial("theme1.shp") 

my_SPDF$ab <- my_SPDF$a - my_SPDF$b 

writeSpatialShape(my_SPDF, "mynewfile")

 

or:

 

library(rgdal)

my_SPDF <- readOGR(".", "theme1")

my_SPDF$ab <- my_SPDF$a - my_SPDF$b

writeOGR(my_SPDF, ".", "mynewfile", driver="ESRI Shapefile")

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090224/f098864f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: THEME1.zip
Type: application/octet-stream
Size: 1084 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090224/f098864f/attachment.obj>


More information about the R-sig-Geo mailing list