Irene,I've really forgotten that I have
an example of my old function for finding spatial neighbors.
The following function will find the neighbors on lattice by the first
order method with max.dist=5.
Hope this helps.
Viki.
neighbor.fun_function(x,y)
{
#function to define neighbor connections
my.weight.fun_function(row1,col1,row2,col2)
{
if (row1==row2)
if (abs(col1-col2)<=5)
return(1)
else return(0)
else if (col1==col2)
if (abs(row1-row2)<=5)
return(1)
else return(0)
else return(0)
}
module(spatial)
ng5_neighbor.grid(nrow=x, ncol=y, neighbor.type="user",
weight.fun=my.weight.fun, max.horiz.dist=6, max.vert.dist=6,
use.pattern=T)
ng5_spatial.condense(ng5, symmetry=T)
s_ng5$row.id
t_ng5$col.id
return(s,t)
}
st_neighbor.fun(24,24)
s_st$s
t_st$t
On Thu, 24 Feb 2000 c7lri@TTACS.TTU.EDU wrote:
> Hi Viki,
> Thanks for answering my message. Yes I have an spatial module, and I'm in
> the process of learning how to use it. I am not sure that I am entering
> my data in the correct way, but I'll keep trying.
>
> Thanks.
>
> Raquel Irene
>
>
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|