asVector

Coerce an Object to a Vector

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

Keywords
models
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.

Value

a vector

See Also

xyVector

Aliases
  • asVector
Examples
library(splines) require(stats) ispl <- interpSpline( weight ~ height, women ) pred <- predict(ispl) class(pred) utils::str(pred) asVector(pred)
Documentation reproduced from package splines, version 3.1.2, License: Part of R 3.1.2

Community examples

Looks like there are no examples yet.