[R] maptools package

Aleksandr Andreev aleksandr.andreev at gmail.com
Wed Nov 10 19:07:02 CET 2010


A few years back, I wrote some code to plot maps with the maptools
package. Now I am trying to reproduce my results, only to find out
that maptools has been updated and my code no longer works.

I've been able to fix the first part of it by forcing
spb <- maptools:::read.shape("/home/sasha/Documents/maps/spb.shp")

(as read.shape has been deprecated)

but now when I do
plot(spb, xlab="Longitude", ylab="Latitude", main="Map of St
Petersburg, Russia")

I get the message
Error in xy.coords(x, y, xlabel, ylabel, log) :
  'x' is a list, but does not have components 'x' and 'y'

What's the new syntax that I'm supposed to use?

I'm using R version 2.12.0 (2010-10-15) on x86_64-pc-linux-gnu (64-bit)

Thanks,

------------------------
Aleksandr Andreev
Graduate Student - Department of Economics
University of North Carolina at Chapel Hill
Mobile: +1 303 507 93 88
Skype: typiconman



More information about the R-help mailing list