xyVector               package:splines               R Documentation

_C_o_n_s_t_r_u_c_t _a_n _x_y_V_e_c_t_o_r _O_b_j_e_c_t

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

     Create an object to represent a set of x-y pairs.  The resulting
     object can be treated as a matrix or as a data frame or as a
     vector. When treated as a vector it reduces to the 'y' component
     only.

     The result of functions such as 'predict.spline' is returned as an
     'xyVector' object so the x-values used to generate the y-positions
     are retained, say for purposes of generating plots.

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

     xyVector(x, y)

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

       x: a numeric vector

       y: a numeric vector of the same length as 'x'

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

     An object of class 'xyVector' with components 

       x: a numeric vector

       y: a numeric vector of the same length as 'x'

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

     Douglas Bates and Bill Venables

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

     ispl <- interpSpline( weight ~ height, women )
     weights <- predict( ispl, seq( 55, 75, len = 51 ))
     class( weights )
     plot( weights, type = "l", xlab = "height", ylab = "weight" )
     points( women$height, women$weight )
     weights

