Skip to content
Prev 19153 / 29559 Next

Problems wirh R 3.0.1 and maptools

What happens if you try these, derived from the examples in ?rgdal:

## from ?readOGR
dsn <- system.file("vectors", package = "rgdal")[1]

## then read two of the shapefiles in that directory
cit <- readOGR(dsn,'cities')
plot(cit)

tmp <- readOGR(dsn,'trin_inca_pl03')
plot(tmp)


They work for me, also having recently upgraded to R 3.0.1 on a Mac.

I see that error message from time to time, and if I recall correctly it
usually has something to do with which packages I have (or don't have)
attached. 

Similar to what Lee said, I would make sure you have up to date versions
of everything that maptools and rgdal depend on.

Compare with the versions I have:
Loading required package: rgdal
Loading required package: sp
rgdal: version: 0.8-10, (SVN revision 478)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.9.2, released 2012/10/08
Path to GDAL shared files:
/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rgdal/gdal
Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
Path to PROJ.4 shared files:
/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rgdal/proj



I'd also suggest including the the output of sessionInfo() in your posts
(standard practice for all requests for R help)

-Don