Skip to Content

asVector {splines}

Coerce an Object to a Vector
Package: 
splines
Version: 
R 3.0.2

Description

This is a generic function. Methods for this function coerce objects of given classes to vectors.

Usage

asVector(object)

Arguments

object
An object.

Details

Methods for vector coercion in new classes must be created for the asVector generic instead of as.vector. The as.vector function is internal and not easily extended. Currently the only class with an asVector method is the xyVector class.

Values

a vector

See Also

xyVector

Examples

require(stats)
ispl <- interpSpline( weight ~ height,  women )
pred <- predict(ispl)
class(pred)
utils::str(pred)
asVector(pred)

Author(s)

Douglas Bates and Bill Venables

Documentation reproduced from R 3.0.2. License: GPL-2.