


Hi guys,

 

I got some
replies, and I thank you a lot, asking me to be more precise and so you’ll get
the long story.

 

I have to analyze
some bird presence data using a geostatistical approach and covariate data.

So I have a
DB with 1000 points counts and:

 

-        
Number
of birds of the selected species (used as variable)

-        
X
coord (as coord.)

-        
Y
coord (as coord.)

-        
%
of open areas in the 100m plot (as covariate)

-        
%
of forest in the 100m plot (as covariate)

-        
%
of urban in the 100m plot (as covariate)

 

So I did:

 

GP8560_2007
<- as.geodata (p8560_2007, cords.col=2:3, data.col=7, covar.col=4:6)

Plot (GP8560_2007)

 

I am now at
the point where I need to do some exploratory analysis and then go to the
Kriging, IGW and geoGLM to see the results.

 

But first I’d
like to specify the borders of the geodata in order to see them on the graphs
but also limit the extent of the geoanalysis. The borders of the study area, Lombardy (you are all invited to visit the Italian Alps),
are in a polygon shape file; so, using maptools,  I did:

 

Read.shape
(lombardia.shp)

 

And I get a
“Map” object that seems not to fit in the borders= option of the as.geodata
command.

 

Suggestions
on as.geodata problem are more then welcome and also ANY kind of hint on the
geostatistical analysis would have all my gratitude.

 

Thanks

 

Luca 



> Date: Wed, 12 Dec 2007 19:35:54 +0100
> From: Roger.Bivand@nhh.no
> To: luca_moiana@hotmail.com
> CC: r-sig-geo@stat.math.ethz.ch
> Subject: Re: [R-sig-Geo] Define bordres in geoR using a shape file??
> 
> On Wed, 12 Dec 2007, Luca Moiana wrote:
> 
> > Hello everyone,
> >
> > I’m moving
> > to R to do gesostatistics and today’s problem is:
> >
> > I have a shp file of the region I’m considering and I want to define the 
> > value “borders=” in the expression as.geodata.
> >
> > I imported the shapefile using maptools and I now have a spatial object, 
> > I think I have to convert the spatial object in a 2 columns matrix but I 
> > have no clue.
> >
> 
> Please quote a short extract of your commands, and show what sessionInfo() 
> says, both help. My reading of the code suggests that if the class of your 
> polygons object is "SpatialPolygons", you can pass this through borders=, 
> and the internal point-in-polygon function will find which locations= 
> points fall inside the polygons. The borders= argument can also be a 
> matrix, but it is turned into a SpatialPolygons object internally. Use 
> as(<>, "SpatialPolygons") to coerce to SpatialPolygons.
> 
> An alternative is to overlay() your input locations (SpatialGrid object) 
> with the SpatialPolygons object to make a SpatialPixels object, then take 
> coordinates() of that object and pass them through locations=.
> 
> Roger
> 
> >
> > Any help is greatly welcome!!
> >
> > Luca
> >
> 
> -- 
> 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@nhh.no

_________________________________________________________________
Get the power of Windows + Web with the new Windows Live.

	[[alternative HTML version deleted]]


