[R-sig-Geo] Plotting shapefiles in R

Roger Bivand Roger.Bivand at nhh.no
Wed Jan 11 20:30:56 CET 2012


On Wed, 11 Jan 2012, celso at stephan.mus.br wrote:

> Try this:

Please note that the shapefiles package has not been revised since 2006, 
and does not use sp classes, so you are completely stuck with the import 
data representation of that package. See the "Spatial" task view on CRAN 
for better supported alternatives.

Roger

>
> ## read polygon SHP
> library(shapefiles)
> poli<-read.shapefile("your shp file name")
> poli<-convert.to.simple(poli$shp)
> poli<-poli[,-1]
> plot(poli)
>
>
>
>
>
>> Hello,
>>
>> I am trying to perform several spatial analysis on R, based on polygon
>> lists. My data come from ArcGIS, being in shape format. I would like to
>> create a polygon list from this file. Apparently, R reads properly the
>> file
>> by using the function "read.shapefile", however when I try the function
>> "plot" on this object, the program does not recognize which are the X and
>> Y
>> coordinates (which -by the way- are in decimal degree units). Should I use
>> any specific sintaxis to indicate which columns are my coordinates? or
>> maybe I have to project my coordinates somehow?
>>
>> Thank you very much indeed,
>>
>> --
>> Ester
>>
>> 	[[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>
> _______________________________________________
> 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, NHH Norwegian School of Economics,
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