BivariateInterpolation      package:fUtilities      R Documentation

_B_i_v_a_r_i_a_t_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:

     A collection and description of functions which allow to
     interpolate and smooth bivariate irregular  data sets including
     linear interpolation, Akima spline interpolation, and kriging. 

     Gridded Interpolation Functions:

       'linearInterp'  performs linear spline interpolation,
       'akimaInterp'   performs Akima spline interpolation,
       'krigeInterp'   performs krige interpolation.

     Pointwise Interpolation Functions:

       'linearInterpp'  performs linear spline interpolation,
       'akimaInterpp'   performs Akima spline interpolation

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

      
     linearInterp(x, y = NULL, z = NULL, gridPoints = 21,
         xo = seq(min(x), max(x), length = gridPoints),
         yo = seq(min(y), max(y), length = gridPoints))
     linearInterpp(x, y = NULL, z = NULL, xo, yo)
          
     akimaInterp(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)
     akimaInterpp(x, y = NULL, z = NULL, xo, yo, extrap = FALSE)

     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: [griddata] - 
           '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. 
           [akimaInterp][krigeInterp] - 
           either three numeric vectors of equal length or if  'y'  and
          'z' are NULL, a list with entries 'x', 'y',  'z', or named
          data frame with 'x' in the first,  'y' in the second, and 'z'
          in the third column. 
           [persp][contour] - 
           'x' is an pbject of class 'gridData'. 

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

  xo, yo: [*Interp] - 
           two numeric vectors of data points spanning the grid.
           [*Interpp] - 
           two numeric vectors of data points building pairs for
          pointwise interpolation. 

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

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

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

     'linearInterp' - 
      'akimaInterp' - 
      'krigeInterp' - 
      A list with at least three entries, 'x', 'y' and 'z'.  Note, that
     the returned values, can be directly used by the 
     'persp.gridData()' and 'contour.gridData' 3D plotting methods.

     'linearInterpp' - 
      'akimaInterpp' - 
      A data.frame with columns '"x"', '"y"', and '"z"'.

_N_o_t_e:

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

     IMPORTANT: The contributed package 'akima' is not in the 
     dependence list of the DESCRIPTION file due to license conditions.
     The Rmetrics user has to load this package from the CRAN server on
      his own responsibility, please check the license conditions.

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

     Diethelm Wuertz for the Rmetrics R-port,
      H. Akima for the Fortran Code of the Akima spline interpolation
     routine.

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

      
     ## Not run: 
     ## akimaInterp -
        # Akima Interpolation:    
        set.seed(1953)
        x = runif(999) - 0.5
        y = runif(999) - 0.5
        z = cos(2*pi*(x^2+y^2))
        ans = akimaInterp(x, y, z, extrap = FALSE)
        persp(ans)
        contour(ans)
        
     ## krigeInterp -
        # Kriging:    
        ans = krigeInterp(x, y, z, extrap = FALSE)
        persp(ans)
        contour(ans)
     ## End(Not run)

