makegrid                package:gstat                R Documentation

_m_a_k_e _r_e_g_u_l_a_r _g_r_i_d _w_i_t_h _s_q_u_a_r_e _c_e_l_l_s _a_n_d _r_o_u_n_d _n_u_m_b_e_r_s

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

     make regular grid with square cells and round numbers

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

     makegrid(x, y, n=10000, nsig=2, margin=1.05, cell.size)

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

       x: x-coordinate 

       y: y-coordinate 

       n: approximate number of cells in grid 

    nsig: number of significant digits to which cell size and origin
          are rounded

  margin: margin around the x and y coordinate limits

cell.size: cell size; if missing, a reasonable, and rounded, estimate
          is made

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

     data frame with the following elements: 

       x: x-coordinates 

       y: y-coordinate 

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

     data(meuse)
     grd <- makegrid(meuse$x, meuse$y, 1000)
     diff(grd$x)
     diff(grd$y)
     summary(grd)
     grd <- makegrid(meuse$x, meuse$y, cell.size = 40)
     diff(grd$x)
     diff(grd$y)
     summary(grd)

