EVOLUTION-MANAGER
Edit File: periodicSpline.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: Create a Periodic Interpolation Spline</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 periodicSpline {splines}"><tr><td>periodicSpline {splines}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Create a Periodic Interpolation Spline</h2> <h3>Description</h3> <p>Create a periodic interpolation spline, either from <code>x</code> and <code>y</code> vectors, or from a formula/data.frame combination. </p> <h3>Usage</h3> <pre> periodicSpline(obj1, obj2, knots, period = 2*pi, ord = 4L) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>obj1</code></td> <td> <p>either a numeric vector of <code>x</code> values or a formula.</p> </td></tr> <tr valign="top"><td><code>obj2</code></td> <td> <p>if <code>obj1</code> is numeric this should be a numeric vector of the same length. If <code>obj1</code> is a formula this can be an optional data frame in which to evaluate the names in the formula.</p> </td></tr> <tr valign="top"><td><code>knots</code></td> <td> <p>optional numeric vector of knot positions.</p> </td></tr> <tr valign="top"><td><code>period</code></td> <td> <p>positive numeric value giving the period for the periodic spline. Defaults to <code>2 * pi</code>.</p> </td></tr> <tr valign="top"><td><code>ord</code></td> <td> <p>integer giving the order of the spline, at least 2. Defaults to 4. See <code><a href="splineOrder.html">splineOrder</a></code> for a definition of the order of a spline.</p> </td></tr> </table> <h3>Value</h3> <p>An object that inherits from class <code>spline</code>. The object can be in the B-spline representation, in which case it will be a <code>pbSpline</code> object, or in the piecewise polynomial representation (a <code>ppolySpline</code> object). </p> <h3>Author(s)</h3> <p>Douglas Bates and Bill Venables</p> <h3>See Also</h3> <p><code><a href="splineKnots.html">splineKnots</a></code>, <code><a href="interpSpline.html">interpSpline</a></code> </p> <h3>Examples</h3> <pre> require(graphics); require(stats) xx <- seq( -pi, pi, length.out = 16 )[-1] yy <- sin( xx ) frm <- data.frame( xx, yy ) pispl <- periodicSpline( xx, yy, period = 2 * pi) pispl pispl2 <- periodicSpline( yy ~ xx, frm, period = 2 * pi ) stopifnot(all.equal(pispl, pispl2)) # pispl and pispl2 are the same plot( pispl ) # displays over one period points( yy ~ xx, col = "brown") plot( predict( pispl, seq(-3*pi, 3*pi, length.out = 101) ), type = "l" ) </pre> <hr /><div style="text-align: center;">[Package <em>splines</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>