findborderquads             package:CTFS             R Documentation

_R_e_t_u_r_n_s _I_n_d_i_c_e_s _o_f _N_e_i_g_h_b_o_r_i_n_g _Q_u_a_d_r_a_t_s _G_i_v_e_n _a _Q_u_a_d_r_a_t _I_n_d_e_x

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

     Identified neighboring quadrates from a given quadrate number,
     refered to as the 'index'.  Returns the quadrat numbers within a
     given distance.

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

     findborderquads(index, dist = 20, gridsize = 20, plotdim = c(1000, 500))

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

   index: quadrate number, between 0 and 1249 in the standard plot

    dist: distance in m within which the neighboring quadrates are
          located.  Distance is measured from any side of the index
          quadrate.

gridsize: side of the square quadrate, 20 x 20m by default

 plotdim: dimensions of the plot: east-west 1000m and north-south 500m

_D_e_t_a_i_l_s:

     A quadrate is considered a neighbor if any part of it lies within
     'dist' of the center of the quadrate indicated by 'index'.  At the
     minimum the quadrates that share  edges, including corners, will
     always be returned.  This is 8 quadrates.  The 'index' quadrate is
     NOT returned.  All values >=0 and <20 give the same 8 quadrates
     for a centrally located quadrate.

     As 'dist' increases, more quadrates can be included up to the
     edges of the plot.  For 'gridsize'=20, 8 quadrates are neighbors
     up to 'dist'<20.  This doesn't change until 'dist' >= 20, then
     there are 24 neighbors, etc.

     This function depends upon 'index.to.rowcol' to identify the
     neighboring quadrates.

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

     Returns a vector of numbers, the quadrate indices for all
     surrounding quadrates.

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

     Rick Condit

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

     'CTFS.quadfunctions'

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

     ## Not run: 
     sort(findborderquads(231,dist=10))
     sort(findborderquads(231,dist=20))
     sort(findborderquads(231,dist=0))

     ## End(Not run)

