quadratcount            package:spatstat            R Documentation

_Q_u_a_d_r_a_t _c_o_u_n_t_i_n_g _f_o_r _a _p_o_i_n_t _p_a_t_t_e_r_n

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

     Divides window into quadrats and  counts the numbers of points in
     each quadrat.

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

       quadratcount(X, nx=5, ny=nx, xbreaks, ybreaks)

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

       X: A point pattern (object of class '"ppp"'). 

   nx,ny: Numbers of quadrats in the x and y directions. Incompatible
          with 'xbreaks' and 'ybreaks'. 

 xbreaks: Numeric vector giving the x coordinates of the boundaries of
          the quadrats. Incompatible with 'nx'. 

 ybreaks: Numeric vector giving the y coordinates of the boundaries of
          the quadrats. Incompatible with 'ny'. 

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

     Quadrat counting is an elementary technique for analysing spatial
     point patterns. See Diggle (2003).

     The window containing the point pattern 'X' is divided into an 'nx
     * ny' grid of rectangular tiles or `quadrats'. The number of
     points of 'X' falling in each quadrat is counted. These numbers
     are returned as a contingency table.

     If 'xbreaks' is given, it should be a numeric vector giving the x
     coordinates of the quadrat boundaries. If it is not given, it
     defaults to a sequence of 'nx+1' values equally spaced over the
     range of x coordinates in the window 'X$window'.

     Similarly if 'ybreaks' is given, it should be a numeric vector
     giving the y coordinates of the quadrat boundaries. It defaults to
     a vector of 'ny+1' values equally spaced over the range of y
     coordinates in the window. The lengths of 'xbreaks' and 'ybreaks'
     may be different.

     The algorithm counts the number of points of 'X' falling in each
     quadrat, and returns these counts as a contingency table. The
     '[i,j]' entry in the contingency table is the point count for the
     quadrat with coordinates '(xbreaks[i],xbreaks[i+1])' by
     '(ybreaks[i], ybreaks[i+1])'.

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

     A contingency table containing the number of points in each
     quadrat.

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

     Adrian Baddeley adrian@maths.uwa.edu.au <URL:
     http://www.maths.uwa.edu.au/~adrian/> and Rolf Turner
     rolf@math.unb.ca <URL: http://www.math.unb.ca/~rolf>

_R_e_f_e_r_e_n_c_e_s:

     Diggle, P.J. _Statistical analysis of spatial point patterns_.
     Academic Press, 2003.

     Stoyan, D. and Stoyan, H. (1994) Fractals, random shapes and point
     fields: methods of geometrical statistics. John Wiley and Sons.

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

      X <- runifpoint(50)
      quadratcount(X)
      quadratcount(X, 4, 5)
      quadratcount(X, xbreaks=c(0, 0.3, 1), ybreaks=c(0, 0.4, 0.8, 1))

