

interpolate(e1071)                           R Documentation

_I_n_t_e_r_p_o_l_a_t_e _V_a_l_u_e_s _o_f _A_r_r_a_y

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

     For each row in matrix `x', the hypercube of `a' con-
     taining this point is searched. The corners of the
     hypercube are linearly interpolated. By default, `dim-
     names(a)' is taken to contain the coordinate values for
     each point in `a'. This can be overridden using
     `adims'. If `method=="constant"', the value of the
     ``lower left'' corner of the hypercube is returned.

_U_s_a_g_e_:

     interpolate(x, a, adims=lapply(dimnames(a), as.numeric),
                 method="linear")

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

       x: Matrix of values at which interpolation shall take
          place.

       a: Array of arbitrary dimension.

   adims: List of the same structure as `dimnames(a)'.

  method: Interpolation method, one of `"linear"' or {"con-
          stant"}.

_A_u_t_h_o_r_(_s_)_:

     Friedrich Leisch

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

     `approx', `spline'

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

     x <- seq(0,3,0.2)
     z <- outer(x,x, function(x,y) sin(x*y))
     dimnames(z) <- list(x,x)
     sin(1.1*2.1)
     interpolate(c(1.1, 2.1),z)

