home *** CD-ROM | disk | FTP | other *** search
-
- _L_i_n_e_a_r_l_y _I_n_t_e_r_p_o_l_a_t_i_n_g _F_u_n_c_t_i_o_n_s
-
- approxfun(x, y, method="linear", rule=1)
-
- _A_r_g_u_m_e_n_t_s:
-
- x,y : vectors giving the coordinates of the points
- to be interpolated. Alternatively a single
- plotting structure can be specified.
-
- xout : an optional set of values specifying where
- interpolation is to take place.
-
- method : this specifies the interpolation method to be
- used. Currently this is ignored and linear
- interpolation is always used.
-
- rule : an integer describing how interpolation is to
- take place outside the interval
- [min(x),max(x)]. If rule is 1 then NAs are
- returned for such points and if it is 2, the
- value at the closest data extreme is used.
-
- _V_a_l_u_e:
-
- A function which will perform linear interpolation of
- the given data points. For a given set of x values
- this function will return the corresponding interpo-
- lated values. This is often more useful than approx.
-
- _S_e_e _A_l_s_o:
-
- approx, spline, splinefun.
-
- _E_x_a_m_p_l_e_s:
-
- x <- 1:10
- y <- rnorm(10)
- f <- approxfun(x, y)
- curve(f(x), 0, 10)
-
-