approxfun.circular: Interpolation periodic Functions defined on the circle

Description Usage Arguments Value Author(s) See Also Examples

Description

Return a list of points which linearly interpolate given data points, or a function performing the linear (or constant) interpolation. The interpolation is performed on modulo 2*pi on the x.

Usage

1
approxfun.circular(x, y = NULL, method = "linear", f = 0, ties = mean)

Arguments

x

an object of class circular.

y

a numeric vector

method

specifies the interpolation method to be used. Choices are "linear" or "constant".

f

for method = "constant" a number between 0 and 1 inclusive, indicating a compromise between left- and right-continuous step functions. If y0 and y1 are the values to the left and right of the point then the value is y0 if f == 0, y1 if f == 1, and y0*(1-f)+y1*f for intermediate values. In this way the result is right-continuous for f == 0 and left-continuous for f == 1, even for non-finite y values.

ties

Handling of tied x values. Either a function with a single vector argument returning a single number result or the string "ordered".

Value

The function approxfun.circular returns a function performing (linear or constant) interpolation of the given data points. For a given set of x values, this function will return the corresponding interpolated values.

Author(s)

Claudio Agostinelli

See Also

approxfun.

Examples

1
2
3
4
x <- rvonmises(100, circular(0), 5)
y <- sin(x)
approxfun(x, y)
  

Example output

Attaching package: 'circular'

The following objects are masked from 'package:stats':

    sd, var

function (v) 
.approxfun(x, y, v, method, yleft, yright, f)
<bytecode: 0x2f9ffa0>
<environment: 0x2fa06b8>

circular documentation built on May 2, 2019, 4:42 p.m.