

   CCrreeaattee aa PPeerriiooddiicc IInntteerrppoollaattiioonn SSpplliinnee

        periodicSpline(obj1, obj2, knots, period, ord)

   AArrgguummeennttss::

       obj1: Either a numeric vector of `x' values or a for-
             mula.

       obj2: If `obj1' is numeric this should be a numeric vec-
             tor of the same length.  If `obj1' is a formula
             this can be an optional data frame in which to
             evaluate the names in the formula.

      knots: An optional numeric vector of knot positions.

     period: A positive numeric value giving the period for the
             periodic spline.  Defaults to `2 * pi'.

        ord: A positive integer giving the order of the spline.
             Defaults to 4.  See `?splineOrder' for a defini-
             tion of the order of a spline.

   DDeessccrriippttiioonn::

        Create a periodic interpolation spline, either from `x'
        and `y' vectors, or from a formula/data.frame combina-
        tion.

   VVaalluuee::

        An object that inherits from class `spline'. The object
        can be in the B-spline representation, in which case it
        will be a `pbSpline' object, or in the piecewise poly-
        nomial representation (a `ppolySpline' object).

   AAuutthhoorr((ss))::

        Douglas Bates and Bill Venables

   SSeeee AAllssoo::

        `splineKnots', `interpSpline', `periodic.spline'

   EExxaammpplleess::

        xx <- seq( -pi, pi, len = 16 )
        yy <- sin( xx )
        frm <- data.frame( xx, yy )
        pispl <- periodicSpline( xx, yy, period = 2 * pi )
        pispl2 <- periodicSpline( yy ~ xx, data = frm, period = 2 * pi )
        # pispl and pispl2 should be the same
        plot( predict( pispl, seq(-3*pi, 3*pi, len = 101) ) )
        plot( pispl )

