Hi,

I would appreciate help with a fairly basic question. I want to use
knearneigh in spdep package. My data set has x-y coordinates like the
columbus data has. And I am trying to replicate coords in knearneigh example

When I try to create coordinates using for example

 xy<- cbind(X,Y)

 I do not get the same as used when invoking the following:

example(columbus)
coords <- coordinates(columbus)
> head(xy)
         X     Y
[1,] 38.80 44.07
[2,] 35.62 42.38
[3,] 39.82 41.18
[4,] 36.50 40.52
[5,] 40.01 38.00
[6,] 43.75 39.28

> head(coords)
         [,1]     [,2]
[1,] 8.827218 14.36908
[2,] 8.332658 14.03162
[3,] 9.012265 13.81972
[4,] 8.460801 13.71696
[5,] 9.007982 13.29637
[6,] 9.739926 13.47463

Thanks,
Nikhil

	[[alternative HTML version deleted]]

