xyVector
Construct an xyVector
Object
Create an object to represent a set of xy 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 xvalues used to generate the
ypositions are retained, say for purposes of generating plots.
 Keywords
 models
Usage
xyVector(x, y)
Arguments
 x
 a numeric vector
 y
 a numeric vector of the same length as
x
Value

An object of class
 x
 a numeric vector
 y
 a numeric vector of the same length as
x
xyVector
with components
Examples
library(splines)
require(stats); require(graphics)
ispl < interpSpline( weight ~ height, women )
weights < predict( ispl, seq( 55, 75, length.out = 51 ))
class( weights )
plot( weights, type = "l", xlab = "height", ylab = "weight" )
points( women$height, women$weight )
weights
Community examples
Looks like there are no examples yet.