splint                package:fields                R Documentation

_C_u_b_i_c _s_p_l_i_n_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 fast, FORTRAN based function for cubic spline interpolation.

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

     splint(x, y, xgrid, derivative=0)

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

       x: The x values that define the curve or a two column matrix of 
           x and y values.  

       y: The y values that are paired with the x's.  

   xgrid: The grid to evaluate the fitted cubic interpolating curve.  

derivative: Indicates whether the function or a a first or second
          derivative  should be evaluated.  

_D_e_t_a_i_l_s:

     Fits a piecewise interpolating cubic polynomial to the x and y
     values assuming that the second and third derivatives are zero at
     the range of the x  values. For this reason extrapolation outside
     the range of the x  values will be a linear function.

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

     A vector consisting of the spline evaluated at the grid values.

_R_e_f_e_r_e_n_c_e_s:

     See Additive Models by Hastie and Tibshriani.

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

     sreg,  Tps

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

     x<- seq( 0, 120,,200)

     splint(rat.diet$t, rat.diet$trt,x )-> y

     plot( rat.diet$t, rat.diet$trt)
     lines( x,y)
     #( this is weird!)

