stinemanSlopes           package:stinepack           R Documentation

_E_s_t_i_m_a_t_e _t_h_e _s_l_o_p_e _o_f _a_n _i_n_t_e_r_p_o_l_a_t_i_n_g _f_u_n_c_t_i_o_n _u_s_i_n_g _a_n _a_r_c

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

     Returns estimates of the slope of an interpolating function that
     runs through a set of points in the xy-plane. The slopes are
     calculated using to the algorithm of Stineman (1980), i.e. from
     the tangent of circles passing through every three consecutive
     points.

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

          stinemanSlopes(x,y,scale=FALSE)

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

     x,y: coordinates of points defining the interpolating function.

   scale: if true (default) then the x and y values are normalized
          prior to the slope calculation.

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

     Returns an estimate of the slope of the interpolant at (x,y).

_N_o_t_e:

     This function is used as part of the Stineman interpolation
     function 'stinterp'.  It is rarely called directly by the user, 
     and checking of x and y must be performed by the calling function.

     Stineman's method provides a more robust interpolating function
     near abrupt steps or spikes in the point sequence than the
     alternative method based on a second degree interpolating
     polynomial,  which is provided by the function 'parabolaSlopes'
     (see the documentation  of the function 'stinterp' for further
     information),  but it results in slightly less accuracy for smooth
     functions.

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

     Tomas Johannesson

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

     Stineman, R. W. _A Consistently Well Behaved Method of
     Interpolation._  Creative Computing (1980), volume 6, number 7, p.
     54-57.

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

     'stinterp' and 'parabolaSlopes'.

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

     ## Interpolate a smooth curve
     x <- seq(0,2*pi,by=pi/6)
     y <- sin(x)
     stinemanSlopes(x,y,scale=TRUE)
     stinemanSlopes(x,y,scale=FALSE)

