nbtest               package:prabclus               R Documentation

_T_e_s_t _o_f _n_e_i_g_h_b_o_r_h_o_o_d _l_i_s_t

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

     Tests a list of neighboring regions for proper format.
     Neighborhood is tested for being symmetrical. Causes an error if
     tests fail.

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

     nbtest(nblist, n.regions=length(nblist))

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

  nblist: A list with a component for every region. The components are
          vectors of integers indicating neighboring regions. A region
          without neighbors (e.g., an island) should be assigned a
          vector 'numeric(0)'.

n.regions: Number of regions.

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

     'invisible{TRUE}'.

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

     Christian Hennig hennig@math.uni-hamburg.de <URL:
     http://www.math.uni-hamburg.de/home/hennig/>

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

     'prabinit'.

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

     data(nb)
     # Note: If you do not use the installed package, replace this by
     # nb <- list()
     # for (i in 1:34)
     #   nb <- c(nb,list(scan(file="(path/)nb.dat",
     #                   skip=i-1,nlines=1)))
     nbtest(nb)
     nb[[1]][1] <- 1
     try(nbtest(nb))

