[R] R and shapefiles

Roger Bivand Roger.Bivand at nhh.no
Mon Oct 16 19:07:54 CEST 2006


On Mon, 16 Oct 2006 matt.pettis at thomson.com wrote:

> Hi,
>  
> I'm a SAS veteran and R newbie.  Can anyone point me to where I can best
> find examples on reading in shapefiles with R, and then merging in
> measurement info for the different polygons?  I'm struggling a bit
> finding a good toehold in the documentation, as I am not yet familiar
> with navigating it yet.

You will find details in the "Spatial" Task View on CRAN, see in 
particular the paragraph on "Reading and writing spatial data".

Assuming that the measurement info has a key field that also identifies 
the polygons, you may find the SpatialPolygonsDataFrame class useful - the 
maptools package depends on the sp package defining that class, so should 
get you there without too much bother. If you have specific questions, 
please consider the R-sig-geo list.

>  
> Thanks,
> Matt
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 

-- 
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-help mailing list