[R-sig-Geo] Getting the Shapefile package to work?

Roger Bivand Roger.Bivand at nhh.no
Fri Nov 3 11:26:30 CET 2006

Replied to on R-help, but shapefiles has an undeclared dependence on 
foreign, which ought to have been made explicit properly in the package. 

Since read.dbf() in foreign is the shapelib function (and maptools and
rgdal also use shapelib), this might suggest that using maptools or rgdal
is a better solution unless you really need to debug shapelib within R (I
have done this for GeoLytics Inc. shapefiles which were breaking the ESRI
specs for the *.shx file, so the shapefiles package can be really 
helpful with broken or non-standard shapefiles).


On Fri, 3 Nov 2006, Hvidberg, Martin wrote:

> Dear list
> - Propoerly a beginner question, so bare with my frustration...
> I tried install the 'shapefiles' package into R 2.4.0 but it seems that the install had little effect...
> 		> install.packages(c("shapefiles"))
> 		--- Please select a CRAN mirror for use in this session ---
> 		trying URL 'http://cran.dk.r-project.org/bin/windows/contrib/2.4/shapefiles_0.5.zip'
> 		Content type 'application/zip' length 42335 bytes
> 		opened URL
> 		downloaded 41Kb
> 		package 'shapefiles' successfully unpacked and MD5 sums checked
> 		The downloaded packages are in
> 		        C:\TEMP\RtmpMz5Pqb\downloaded_packages
> 		updating HTML package descriptions
> 		>  dbf <- read.dbf("test.dbf")
> 		Error: could not find function "read.dbf"
> 		> 
> Note thet the last line contains an error.
> Is the package installed or not?
> How do I get access to use the functionality it offers??
> :-? Martin Hvidberg
> 	[[alternative HTML version deleted]]
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no

More information about the R-sig-Geo mailing list