pred_grid                package:geoR                R Documentation

_G_e_n_e_r_a_t_e_s _a _2_D _P_r_e_d_i_c_t_i_o_n _G_r_i_d

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

     This function facilitates the generation of a 2D prediction grid
     for geostatistical kriging.

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

     pred_grid(coords, y.coords = NULL, ..., y.by = NULL,
               y.length.out = NULL, y.along.with = NULL)

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

  coords: a list, matrix or data-frame with xy-coordinates of
          prediction points or a vector with x-coordinates.  

y.coords: a vector with y-coordinates. Needed if argument 'coords'
          provides only x-coordinates.  

     ...: arguments 'by' or 'length.out' to be passed to the function
          'rep'. These arguments are used for the x-coordinates and are
          default optioons for y-coordinates.  

    y.by: Optional. 'by' argument for 'rep' to be used with the
          y-coordinates. 

y.length.out: Optional. 'length.out' argument for 'rep' to be used with
          the y-coordinates. 

y.along.with: Optional. 'along.with' argument for 'rep' to be used with
          the y-coordinates. 

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

     An two column data-frame which is on output of 'expand.grid'.

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

     See 'seq' and 'expand.grid' which are used internally and 
     'locations.inside' and 'polygrid' to select points inside a
     border.

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

     pred_grid(c(0,1), c(0,1), by=0.25) ## create a grid in a unit square
     loc0 <- pred_grid(ca20$borders, by=20)
     points(ca20, borders=borders)
     points(loc0, pch="+")
     points(locations.inside(loc0, ca20$border), pch="+", col=2)

