Merging shapefiles and csv
On Thu, 31 Jul 2014, HallS wrote:
Hi all, OK thanks for all your help. I believe now I have successfully merged the two, when I run str(merged_file) it shows all of the correct variables, and when I run plot(merged_file), I still get the outline of the correct shape.
Beware that the data from the objects may be jumbled - never use merge, always use match() on the row.names vectors of the objects to ensure that the key-IDs agree. Jumbled data happens, it is important not to think "shapefile" but to think DBMS with the ID key your way of staying sane. Hope this clarifies, Roger
Thank you for all your help, I must confess writeOGR doesn't work still, but I thought this was required in order to draw a choropleth map and I realise now this is not the case and it can be done with just the merged file I believe. Thanks again -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Merging-shapefiles-and-csv-tp7586839p7586845.html Sent from the R-sig-geo mailing list archive at Nabble.com.
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand Department of Economics, Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 91 00 e-mail: Roger.Bivand at nhh.no