nbdists                package:spdep                R Documentation

_S_p_a_t_i_a_l _l_i_n_k _d_i_s_t_a_n_c_e _m_e_a_s_u_r_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Given a list of spatial neighbour links (a neighbours list of
     object type 'nb'), the function returns the Euclidean distances
     along the links in a list of the same form as the neighbours list.
     If longlat = TRUE, Great Circle distances are used.

_U_s_a_g_e:

     nbdists(nb, coords, longlat = NULL)

_A_r_g_u_m_e_n_t_s:

      nb: an object of class 'nb'

  coords: matrix of point coordinates or a SpatialPoints object

 longlat: TRUE if point coordinates are longitude-latitude decimal
          degrees, in which case distances are measured in kilometers;
          if coords is a SpatialPoints object, the value is taken from
          the object itself

_V_a_l_u_e:

     A list with class 'nbdist'

_A_u_t_h_o_r(_s):

     Roger Bivand Roger.Bivand@nhh.no

_S_e_e _A_l_s_o:

     'summary.nb', 'nb2listw'

_E_x_a_m_p_l_e_s:

     example(columbus)
     coords <- coordinates(columbus)
     dlist <- nbdists(col.gal.nb, coords)
     dlist <- lapply(dlist, function(x) 1/x)
     stem(unlist(dlist))

