EVOLUTION-MANAGER
Edit File: asVector.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Coerce an Object to a Vector</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for asVector {splines}"><tr><td>asVector {splines}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Coerce an Object to a Vector</h2> <h3>Description</h3> <p>This is a generic function. Methods for this function coerce objects of given classes to vectors. </p> <h3>Usage</h3> <pre> asVector(object) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object</code></td> <td> <p>An object.</p> </td></tr> </table> <h3>Details</h3> <p>Methods for vector coercion in new classes must be created for the <code>asVector</code> generic instead of <code>as.vector</code>. The <code>as.vector</code> function is internal and not easily extended. Currently the only class with an <code>asVector</code> method is the <code>xyVector</code> class. </p> <h3>Value</h3> <p>a vector </p> <h3>Author(s)</h3> <p>Douglas Bates and Bill Venables</p> <h3>See Also</h3> <p><code><a href="xyVector.html">xyVector</a></code> </p> <h3>Examples</h3> <pre> require(stats) ispl <- interpSpline( weight ~ height, women ) pred <- predict(ispl) class(pred) utils::str(pred) asVector(pred) </pre> <hr /><div style="text-align: center;">[Package <em>splines</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>