krigeInterp            package:fUtilities            R Documentation

_B_i_v_a_r_i_a_t_e _K_r_i_g_e _I_n_t_e_r_p_o_l_a_t_i_o_n

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

     Bivariate Krige Interpolation.

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

      
     krigeInterp(x, y = NULL, z = NULL, gridPoints = 21,
         xo = seq(min(x), max(x), length = gridPoints),
         yo = seq(min(y), max(y), length = gridPoints), 
         extrap = FALSE, polDegree = 6)

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

 x, y, z: the arguments 'x' and 'y' are  two numeric vectors of grid
          pounts, and 'z' is a numeric  matrix or any other rectangular
          object which can be transformed  by the function 'as.matrix'
          into a matrix object.  

gridPoints: an integer value specifying the number of grid points in
          'x'  and 'y' direction. 

  xo, yo: two numeric vectors of data points spanning the grid. 

  extrap: a logical, if 'TRUE' then the data points are extrapolated. 

polDegree: the polynomial krige degree, an integer ranging between 1
          and 6. 

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

     'krigeInterp'

     returns a list with at least three entries, 'x', 'y'  and 'z'.
     Note, that the returned values, can be directly  used by the 
     'persp' and 'contour' 3D plotting methods.

_N_o_t_e:

     The function 'krigeInterp' requires loading of the R package
     'spatial'.

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

     'akimaInterp',  'linearInterp'.

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

        
     ## krigeInterp -
        # Kriging:    
        set.seed(1953)
        x = runif(999) - 0.5
        y = runif(999) - 0.5
        z = cos(2*pi*(x^2+y^2))
        ans = krigeInterp(x, y, z, extrap = FALSE)
        persp(ans, theta = -40, phi = 30, col = "steelblue",
             xlab = "x", ylab = "y", zlab = "z")
        contour(ans)

